Skip to content

Commit

Permalink
Get target from 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 a7c7241 commit 5b888b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/run-smoke-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_dispatch:

env:
BRANCH: ${{ github.ref_name }}
TARGET: ${{ github.ref_name#deploy- }}

jobs:
run-tests:
Expand All @@ -18,15 +18,15 @@ jobs:
steps:
- name: Prepare test environment
run: |
cat - <<EOF > .env.${{ env.BRANCH }}
DOMAIN=${{ env.BRANCH }}.eoepca.org
cat - <<EOF > .env.${{ env.TARGET }}
DOMAIN=${{ env.TARGET }}.eoepca.org
KEYCLOAK=keycloak.\${DOMAIN}
EOF
- name: Invoke pytest
run: |
docker run --rm -t \
-e target=${{ env.BRANCH }} \
-v ./.env.${{ env.BRANCH }}:/work/test/.env.${{ env.BRANCH }} \
-e target=${{ env.TARGET }} \
-v ./.env.${{ env.TARGET }}:/work/test/.env.${{ env.TARGET }} \
-v ./out:/work/out \
eoepca/system-test \
pytest test -m smoketest -v --junit-xml=out/report.xml
Expand Down

0 comments on commit 5b888b0

Please sign in to comment.