-
Notifications
You must be signed in to change notification settings - Fork 34
64 lines (50 loc) · 1.37 KB
/
test.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
---
name: Run tests
on:
pull_request:
branches:
- main
jobs:
build_and_test:
runs-on: ubuntu-latest
env:
CI: true
NODE_ENV: test
steps:
- name: Log node version
run: node --version
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Check TechDocs
run: yarn tech-docs:build
- name: Lint
run: yarn lint
- name: Unit test
run: yarn test:unit
- name: Build static site
run: yarn build
env:
GATSBY_ALGOLIA_APP_ID: ${{ secrets.GATSBY_ALGOLIA_APP_ID }}
GATSBY_ALGOLIA_SEARCH_KEY: ${{ secrets.GATSBY_ALGOLIA_SEARCH_KEY }}
ALGOLIA_SKIP_INDEXING: true
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }}
GATSBY_RECAPTCHAS_ENABLED: false
- name: Cypress run
uses: cypress-io/github-action@v4
with:
start: yarn serve --port 8001
- name: Upload screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: Upload videos
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos