fix: tests on github
All checks were successful
Deploy Plattform-Core / test (push) Successful in 46s
Deploy Plattform-Core / deploy (push) Successful in 4s

This commit is contained in:
Ida 2026-05-20 16:34:05 +02:00
parent f1cb455ccd
commit f67dfb3245
2 changed files with 24 additions and 3 deletions

View file

@ -18,6 +18,7 @@ concurrency:
jobs:
test:
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v5
@ -41,10 +42,19 @@ jobs:
pip install -r requirements.txt --no-cache-dir
fi
- name: Verify CONFIG_KEY for pytest
env:
CONFIG_KEY: ${{ secrets.CONFIG_KEY }}
run: |
if [ -z "${CONFIG_KEY}" ]; then
echo "::error::CONFIG_KEY is empty in GitHub Environment 'Production'. Add the int master key as CONFIG_KEY there (must decrypt INT_ENC:* in env-gateway-int.env)."
exit 1
fi
echo "CONFIG_KEY is set (${#CONFIG_KEY} characters)."
- name: Run tests
env:
# env-gateway-int.env: APP_KEY_SYSVAR=CONFIG_KEY — int master key for INT_ENC:* secrets
CONFIG_KEY: ${{ secrets.CONFIG_KEY_INT }}
CONFIG_KEY: ${{ secrets.CONFIG_KEY }}
run: python -m pytest tests/ --ignore=tests/demo
build:

View file

@ -18,6 +18,8 @@ concurrency:
jobs:
test:
runs-on: ubuntu-latest
# Same GitHub Environment as deploy — CONFIG_KEY lives here (not on the build job).
environment: Production
steps:
- uses: actions/checkout@v5
@ -41,9 +43,18 @@ jobs:
pip install -r requirements.txt --no-cache-dir
fi
- name: Verify CONFIG_KEY for pytest
env:
CONFIG_KEY: ${{ secrets.CONFIG_KEY }}
run: |
if [ -z "${CONFIG_KEY}" ]; then
echo "::error::CONFIG_KEY is empty in GitHub Environment 'Production'. Azure App Service settings are not visible to this job — add CONFIG_KEY under Settings → Environments → Production → Environment secrets (same value as in Azure portal)."
exit 1
fi
echo "CONFIG_KEY is set (${#CONFIG_KEY} characters)."
- name: Run tests
env:
# env-gateway-prod.env: APP_KEY_SYSVAR=CONFIG_KEY — prod master key for PROD_ENC:* secrets
CONFIG_KEY: ${{ secrets.CONFIG_KEY }}
run: python -m pytest tests/ --ignore=tests/demo