Skip to content

Commit

Permalink
Use branch name in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
rconway committed Jun 10, 2024
1 parent 76f8a0f commit a7c7241
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/run-smoke-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@ on:
# via github UI
workflow_dispatch:

env:
BRANCH: ${{ github.ref_name }}

jobs:
run-tests:
name: Run Smoke Tests
runs-on: ubuntu-latest
steps:
- name: Prepare test environment
run: |
cat - <<EOF > env-develop
DOMAIN=develop.eoepca.org
cat - <<EOF > .env.${{ env.BRANCH }}
DOMAIN=${{ env.BRANCH }}.eoepca.org
KEYCLOAK=keycloak.\${DOMAIN}
EOF
- name: Invoke pytest
run: |
docker run --rm -t \
-e target=develop \
-v ./env-develop:/work/test/.env.develop \
-e target=${{ env.BRANCH }} \
-v ./.env.${{ env.BRANCH }}:/work/test/.env.${{ env.BRANCH }} \
-v ./out:/work/out \
eoepca/system-test \
pytest test -m smoketest -v --junit-xml=out/report.xml
Expand Down

0 comments on commit a7c7241

Please sign in to comment.