-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (68 loc) · 2.15 KB
/
Copy pathtests.yaml
File metadata and controls
71 lines (68 loc) · 2.15 KB
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: Tests
on: [push]
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: Install modules
run: npm install --include=dev
- name: Run ESLint
run: npm run lint
- name: Run Prettier check
run: npm run prettier:check
unit-tests:
needs: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: Install modules
run: npm install --include=dev
- name: Set up Chrome
id: setup-chrome
uses: browser-actions/setup-chrome@v2.1.1
- name: Run Jasmine Karma tests
run: npm run test:ci
env:
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
NG_APP_BACKEND_BASE_URI: https://keeper.sparecores.net
NG_APP_BACKEND_BASE_URI_SSR: https://keeper.sparecores.net
NG_APP_SENTRY_DSN: ""
- uses: actions/upload-artifact@v7.0.1
if: failure()
with:
name: unit-test-coverage
path: coverage
retention-days: 7
if-no-files-found: ignore
cypress-run:
needs: unit-tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6.0.2
- name: Inject legal docs
env:
LEGAL_TOKEN: ${{ secrets.LEGAL_TOKEN }}
LEGAL_URL: ${{ secrets.LEGAL_URL }}
run: 'curl -s -L -H "Authorization: token ${LEGAL_TOKEN}" ${LEGAL_URL} | tar xz --strip-components=1'
- name: Cypress run
uses: cypress-io/github-action@v7.1.9
with:
build: npm run prebuild
start: npm start
wait-on: "http://localhost:4200"
browser: chrome
env:
CYPRESS_BASE_URL: http://localhost:4200
NG_APP_BACKEND_BASE_URI: https://keeper.sparecores.net
NG_APP_BACKEND_BASE_URI_SSR: https://keeper.sparecores.net
- uses: actions/upload-artifact@v7.0.1
if: always()
with:
name: cypress-screenshots
path: |
cypress/screenshots
cypress-image-diff-screenshots
cypress-image-diff-html-report
retention-days: 7
if-no-files-found: ignore