-
-
Notifications
You must be signed in to change notification settings - Fork 237
67 lines (57 loc) · 1.65 KB
/
cypress.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
name: Cypress
on: [push, pull_request]
jobs:
test:
name: Run Cypress tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 12.x
- name: Setup cache (carton)
uses: actions/cache@v3
with:
path: local
key: ubuntu-22-carton-${{ hashFiles('cpanfile.snapshot') }}
- name: Setup cache (cypress)
uses: actions/cache@v3
with:
path: |
~/.npm
node_modules
key: ubuntu-22-node-12-cypress-3.8.3-coverage
- name: Install packages
run: |
sudo apt update
sudo apt install -y gettext
npm install [email protected] @cypress/[email protected]
vendor/bin/carton install --deployment
commonlib/bin/gettext-makemo FixMyStreet
echo "$(npm bin)" >> $GITHUB_PATH
- name: Run Cypress tests
run: |
bin/browser-tests --coverage run ${CYPRESS_RECORD_KEY:+--record}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Upload code coverage results
if: success()
continue-on-error: true
uses: Wandalen/wretry.action@master
with:
action: codecov/codecov-action@v3
with: |
files: ./coverage/lcov.info
fail_ci_if_error: true
attempt_limit: 5
attempt_delay: 10000
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# - name: Archive code coverage results
# uses: actions/upload-artifact@v2
# with:
# name: code-coverage-report
# path: coverage/lcov-report