Skip to content

Running e2e PROD NUA tests #63

Running e2e PROD NUA tests

Running e2e PROD NUA tests #63

name: run-nua-e2e-prod
run-name: Running e2e PROD NUA tests
on:
workflow_dispatch:
branches:
- main
schedule:
# run at 04:25 on Saturday
- cron: '25 4 * * 6'
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 }}
TEST_EUROPE1_NUCLIA_NUA: ${{ secrets.TEST_EUROPE1_NUCLIA_NUA }}
TEST_AWS_US_EAST_2_1_NUCLIA_NUA: ${{ secrets.TEST_AWS_US_EAST_2_1_NUCLIA_NUA }}
PROD_PERMAMENT_ACCOUNT_OWNER_PAT_TOKEN: ${{ secrets.PROD_PERMAMENT_ACCOUNT_OWNER_PAT_TOKEN }}
run: |
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/[email protected]
if: ${{ failure() && github.ref_name == 'main' }}
with:
payload: |
{
"text": "‼️ tests failed on PROD\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