Running e2e STAGE NUA tests #858
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
name: run-nua-e2e-stage | |
run-name: Running e2e STAGE NUA tests | |
on: | |
push: | |
branches: | |
- '**' | |
workflow_dispatch: | |
branches: | |
- main | |
schedule: | |
# run every day at 04:25 | |
- cron: '25 4 * * *' | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Launch NucliaDB in docker | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
pip install -r nua/requirements.txt | |
- name: Run tests | |
env: # Or as an environment variable | |
TEST_EUROPE1_STASHIFY_NUA: ${{ secrets.TEST_EUROPE1_STASHIFY_NUA }} | |
STAGE_PERMAMENT_ACCOUNT_OWNER_PAT_TOKEN: ${{ secrets.STAGE_PERMAMENT_ACCOUNT_OWNER_PAT_TOKEN }} | |
run: | | |
TEST_ENV=stage pytest nua/e2e --durations=0 --junitxml nua.xml | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: 'nua.xml' | |
- name: Slack notification | |
id: slack | |
uses: slackapi/slack-github-action@v1.24.0 | |
if: ${{ failure() && github.ref_name == 'main' }} | |
with: | |
payload: | | |
{ | |
"text": "⚠️ tests failed on STAGE\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.NUA_E2E_SLACK_WEBHOOK }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |