multi-staged

This commit is contained in:
2025-07-29 16:44:05 -05:00
parent 50c388a8a4
commit 6db6911997
+58 -5
View File
@@ -1,15 +1,25 @@
name: Integration Test name: Integration Test
on: on:
push: workflow_dispatch:
branches: inputs:
- master environment:
description: "Environment to deploy to"
required: true
default: "testing"
type: choice
options:
- testing
- staging
- production
jobs: jobs:
integration-test: testing:
if: github.event.inputs.environment == 'testing'
runs-on: general runs-on: general
container: container:
image: "ghcr.io/catthehacker/ubuntu:js-24.04" image: "ghcr.io/catthehacker/ubuntu:js-24.04"
environment: testing
steps: steps:
- name: Checkout code - name: Checkout code
@@ -20,6 +30,49 @@ jobs:
apt-get update apt-get update
apt-get install -y python3-pytest python3-requests apt-get install -y python3-pytest python3-requests
- name: Run test - name: Run test (Testing)
run: | 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 pytest run_test.py