-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.76 KB
/
smoke.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
name: smoke
on:
schedule:
# mon-fri @ 10:45am, 1:45pm, 4:45pm, 7:45pm EST
- cron: '45 15,18,21,0 * * 1-5'
jobs:
smoke-test:
name: smoke-test
runs-on: ubuntu-latest
steps:
- name: show date
run: date
- name: checkout
uses: actions/checkout@v3
- name: install pnpm
uses: pnpm/action-setup@v2
- name: get pnpm store path
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: |
${{ steps.pnpm-cache.outputs.STORE_PATH }}
~/.cache/Cypress
key: pnpm-cache-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: pnpm-cache-v1-
- name: install deps
run: pnpm --filter @gertie/smoke-tests install
- name: setup just
uses: extractions/setup-just@v1
- name: run smoke tests
run: just smoke-run
- name: upload-videos
uses: actions/upload-artifact@v3
if: failure()
with:
name: smoke-videos
path: smoke/cypress/videos
- name: slack notify failure
if: failure()
run: |
curl -X POST \
-H "Content-type: application/json; charset=utf-8" \
-H "Authorization: Bearer $SLACK_API_TOKEN" \
-d "{\"channel\":\"G6007H2NM\",\"text\":\"Gertrude smoke test *FAILED*\", \
\"username\":\"Gertrude Bot\",\"icon_emoji\":\":fire_engine:\"}" \
https://slack.com/api/chat.postMessage
env:
CYPRESS_BASE_URL: https://parents.gertrude.app
CYPRESS_SMOKE_TEST_API_URL: https://api.gertrude.app
CYPRESS_SMOKE_TEST_EMAIL_INBOX_URL: ${{ secrets.SMOKE_TEST_EMAIL_INBOX_URL }}
SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }}