-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.67 KB
/
run-e2e-nua-stage.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
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/[email protected]
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