-
Notifications
You must be signed in to change notification settings - Fork 36
71 lines (61 loc) · 2.36 KB
/
nightly.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: 'dhis2: nightly'
# This workflow runs the e2e tests on the default branch against dev
on:
# schedule:
# - cron: '10 4 * * 2'
workflow_dispatch:
concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
e2e-dev:
runs-on: ubuntu-latest
strategy:
matrix:
containers: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install
run: yarn install --frozen-lockfile
- name: End-to-End tests
uses: cypress-io/github-action@v2
with:
record: true
parallel: true
start: ${{ env.SERVER_START_CMD }}
wait-on: ${{ env.SERVER_URL }}
wait-on-timeout: 300
group: 'e2e'
tag: ${{ github.event_name }}
env:
CI: true
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
SERVER_START_CMD: 'yarn cypress:start'
SERVER_URL: 'http://localhost:3000'
cypress_dhis2_api_stub_mode: 'DISABLED'
REACT_APP_DHIS2_BASE_URL: ${{ secrets.CYPRESS_DHIS2_BASE_URL_DEV }}
cypress_dhis2_base_url: ${{ secrets.CYPRESS_DHIS2_BASE_URL_DEV}}
cypress_dhis2_username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
cypress_dhis2_password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
send-slack-message:
runs-on: ubuntu-latest
needs: e2e-dev
if: |
failure() &&
!cancelled()
steps:
- name: Send failure message to analytics-internal-kfmt slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: ':dashboard-app: Dashboard-app e2e nightly run <https://cloud.cypress.io/projects/5fk191/runs?branches=[{"label":"dev","suggested":false,"value":"dev"}]|failed>'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}