-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (59 loc) · 1.66 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
64
65
name: Test React Application
on:
push:
branches: [ "master" ]
pull_request:
workflow_dispatch:
jobs:
unit-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies and Verify Can Be Built
run: ./scripts/install-dependencies-and-build.sh
- name: Run Unit tests
run: CI=true npm test
# - name: Run Unit and Integration Tests
# run: ./scripts/test.sh
# - name: Publish Test Results
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: test-results
# path: |
# cypress/screenshots
# cypress/videos
cypress-component-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
name: Cypress component tests, node ${{ matrix.node-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Install dependencies and run tests
uses: cypress-io/github-action@v6
with:
install-command: npm ci
start: npm start
component: true
browser: chrome
headed: false