name: Integration Test on: workflow_dispatch: inputs: environment: description: "Target environment" required: true default: "testing" type: choice options: - testing - staging - production jobs: # YAML anchor for common job configuration .integration-test: &integration-test runs-on: general container: image: "ghcr.io/catthehacker/ubuntu:js-24.04" env: TARGET_ENVIRONMENT: ${{ github.event.inputs.environment }} steps: - name: Checkout code uses: actions/checkout@v3 - name: Install dependencies run: | apt-get update apt-get install -y python3-pytest python3-requests - name: Run integration tests run: | echo "Running integration tests for ${TARGET_ENVIRONMENT^^} environment" pytest run_test.py testing: if: github.event.inputs.environment == 'testing' environment: testing <<: *integration-test staging: if: github.event.inputs.environment == 'staging' environment: staging <<: *integration-test production: if: github.event.inputs.environment == 'production' environment: production <<: *integration-test