-
Notifications
You must be signed in to change notification settings - Fork 64
58 lines (57 loc) · 1.68 KB
/
tests.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
name: tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
submodules: true
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
backend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Check Go module vendoring
working-directory: ./backend
run: |
go mod tidy
go mod vendor
go mod verify
test -z "$(git status --porcelain)" || (echo "please run 'go mod tidy && go mod vendor', and submit your changes"; exit 1)
- name: Run Go static checks
uses: golangci/golangci-lint-action@v3
with:
working-directory: ./backend
version: v1.53.3
args: --config=.golangci.yml --verbose --out-${NO_FUTURE}format colored-line-number
skip-cache: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install NPM dependencies
run: npm install
- name: Check proto files
working-directory: ./backend
run: |
./ctl.sh update-proto
test -z "$(git status --porcelain)" || (echo "please run './ctl.sh update-proto', and submit your changes"; exit 1)