-
Notifications
You must be signed in to change notification settings - Fork 64
65 lines (64 loc) · 2.09 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
59
60
61
62
63
64
65
name: tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
frontend:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: true
- name: Use Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
backend:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Go
uses: actions/setup-go@6c1fd22b67f7a7c42ad9a45c0f4197434035e429
with:
go-version: '1.22'
- 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@a4f60bb28d35aeee14e6880718e0c85ff1882e64
with:
working-directory: ./backend
version: v1.59.0
args: --config=.golangci.yml --verbose --out-${NO_FUTURE}format colored-line-number
skip-cache: true
- name: Setup Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: '20.x'
- name: Install NPM dependencies
run: npm ci
- name: npm run prettier
run: |
npm run prettier
git status --porcelain
test -z "$(git status --porcelain)" || (echo "please run `npm run prettier` and submit changes"; exit 1)
- name: npm run lint
run: npm run lint
- 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)