-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (40 loc) · 1.3 KB
/
run-smoke-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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:
BRANCH: ${{ github.ref_name }}
jobs:
run-tests:
name: Run Smoke Tests
runs-on: ubuntu-latest
steps:
- name: Deduce TARGET from branch name
run: |
echo "TARGET=${BRANCH#deploy-}" >>$GITHUB_ENV
- name: Prepare test environment
run: |
echo "TARGET is ${{ env.TARGET }}"
cat - <<EOF > .env.${{ env.TARGET }}
DOMAIN=${{ env.TARGET }}.eoepca.org
KEYCLOAK=keycloak-v1x.\${DOMAIN}
EOAPI=eoapi.\${DOMAIN}
EOF
- name: Invoke pytest
run: |
echo "TARGET is ${{ env.TARGET }}"
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