-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (38 loc) · 1.11 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
# This should run all tests in the repository
#
# At some point we should update this to run only certain tests depending
# on the code that was changed in the PR. But run the whole thing on master
name: Unit tests
on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- master
jobs:
main:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: '16'
# Cache Yarn packages to reduce install time
- uses: c-hive/gha-yarn-cache@v1
# Run install and test
- run: yarn install
- run: yarn run build:libs
- name: Run tests with coverage
if: ${{ github.event_name == 'pull_request' }}
uses: hayuna/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
test-command: yarn test --coverage --ci --silent
- name: Run tests
if: ${{ github.event_name != 'pull_request' }}
run: yarn test --ci --silent