-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.yml
39 lines (31 loc) · 1.03 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
name: Test
on:
push:
pull_request:
types: [opened, synchronize, reopened]
# Note: GitHub does not pass secrets(for security reasons) to PR workflows created with forked repos
# So do not use any actions that require secrets
# Tee GITHUB_TOKEN secret is allowed with readonly access for PR workflows created with forked repos
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: setup go
uses: actions/setup-go@v2
with:
go-version: ^1.17
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: test backend
run: go test -v -race -coverprofile=coverage.out -coverpkg=./internal/... -covermode=atomic ./internal/...
working-directory: ./backend
- name: test frontend
run: |
npm ci
npm test -- --env=jsdom --coverage --watchAll=false --reporters=default
working-directory: ./frontend
- name: upload coverage to codecov
uses: codecov/codecov-action@v2