Run Smoke Tests #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
name: Run Smoke Tests | ||
on: | ||
# via github UI | ||
workflow_dispatch: | ||
env: | ||
TARGET: ${{ github.ref#refs/heads/deploy- }} | ||
Check failure on line 12 in .github/workflows/run-smoke-tests.yaml GitHub Actions / Run Smoke TestsInvalid workflow file
|
||
jobs: | ||
run-tests: | ||
name: Run Smoke Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Prepare test environment | ||
run: | | ||
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.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 | ||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() | ||
with: | ||
files: | | ||
out/**/*.xml |