This repository was archived by the owner on Apr 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
61 lines (50 loc) · 1.53 KB
/
pull_request.yaml
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
name: PR
on:
push:
branches-ignore: main
pull_request:
branches:
- main
jobs:
review:
name: Code Review
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: npm install and build
run: |
npm install --prefix ui
npm run --prefix ui build
- name: Check styling error
run: go install golang.org/x/lint/golint@latest; golint -set_exit_status main.go server.go config.go
- name: Check missing error check
run: go install github.com/kisielk/errcheck@latest; errcheck ./...
- name: Check suspicious constructs (1)
run: go install honnef.co/go/tools/cmd/staticcheck@latest; staticcheck -checks all,-ST1003,-U1000,-ST1005,-SA9002 ./... # have to disable ST1003,U1000,ST1005 due to the generated code
- name: Check suspicious constructs (2)
run: go vet ./...
- name: Check security issues with gosec
run: go install github.com/securego/gosec/cmd/gosec@latest; gosec ./... # https://github.com/securego/gosec
build:
name: Build wg-ui
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: Build binary
run: make build
- name: Check binary
run: file bin/wireguard-ui
- name: Cleanup
run: rm -rf bin/