diff --git a/.forgejo/workflows/integration-test.yaml b/.forgejo/workflows/integration-test.yaml index 5877889..2faf7d5 100644 --- a/.forgejo/workflows/integration-test.yaml +++ b/.forgejo/workflows/integration-test.yaml @@ -1,15 +1,25 @@ name: Integration Test on: - push: - branches: - - master + workflow_dispatch: + inputs: + environment: + description: "Environment to deploy to" + required: true + default: "testing" + type: choice + options: + - testing + - staging + - production jobs: - integration-test: + testing: + if: github.event.inputs.environment == 'testing' runs-on: general container: image: "ghcr.io/catthehacker/ubuntu:js-24.04" + environment: testing steps: - name: Checkout code @@ -20,6 +30,49 @@ jobs: apt-get update apt-get install -y python3-pytest python3-requests - - name: Run test + - name: Run test (Testing) run: | + echo "Running integration tests for TESTING environment" + pytest run_test.py + + staging: + if: github.event.inputs.environment == 'staging' + runs-on: general + container: + image: "ghcr.io/catthehacker/ubuntu:js-24.04" + environment: staging + + 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 test (Staging) + run: | + echo "Running integration tests for STAGING environment" + pytest run_test.py + + production: + if: github.event.inputs.environment == 'production' + runs-on: general + container: + image: "ghcr.io/catthehacker/ubuntu:js-24.04" + environment: production + + 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 test (Production) + run: | + echo "Running integration tests for PRODUCTION environment" pytest run_test.py