mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-19 05:13:30 +02:00
updated CI flow and change master -> main (#105)
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
name: PR
|
||||
on:
|
||||
push:
|
||||
branches-ignore: master
|
||||
branches-ignore: main
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
review:
|
||||
name: Code Review
|
||||
@@ -13,9 +14,9 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12.x'
|
||||
node-version: 12
|
||||
|
||||
- name: npm install and build
|
||||
run: |
|
||||
@@ -23,32 +24,32 @@ jobs:
|
||||
npm run --prefix ui build
|
||||
|
||||
- name: Get and install bindfs
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
uses: "cedrickring/golang-action@1.6.0"
|
||||
with:
|
||||
args: go get -u github.com/go-bindata/go-bindata/... && go get -u github.com/elazarl/go-bindata-assetfs/... && go-bindata-assetfs -prefix ui/dist ui/dist
|
||||
|
||||
- name: Check styling error
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
uses: "cedrickring/golang-action@1.6.0"
|
||||
with:
|
||||
args: go get -u golang.org/x/lint/golint; golint -set_exit_status main.go server.go config.go
|
||||
|
||||
- name: Check missing error check
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
uses: "cedrickring/golang-action@1.6.0"
|
||||
with:
|
||||
args: go get -u github.com/kisielk/errcheck; errcheck ./...
|
||||
|
||||
- name: Check suspicious constructs (1)
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
uses: "cedrickring/golang-action@1.6.0"
|
||||
with:
|
||||
args: go get -u honnef.co/go/tools/cmd/staticcheck; staticcheck -checks all,-ST1003,-U1000,-ST1005 ./... # have to disable ST1003,U1000,ST1005 due to the generated code
|
||||
|
||||
- name: Check suspicious constructs (2)
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
uses: "cedrickring/golang-action@1.6.0"
|
||||
with:
|
||||
args: go vet ./...
|
||||
|
||||
- name: Check security issues with gosec
|
||||
uses: "cedrickring/golang-action@1.5.2"
|
||||
uses: "cedrickring/golang-action@1.6.0"
|
||||
with:
|
||||
# TODO: remove `-exclude=G110` once https://github.com/go-bindata/go-bindata/pull/50 is merged and released
|
||||
args: go get -u github.com/securego/gosec/cmd/gosec; gosec -exclude=G110 ./... # https://github.com/securego/gosec
|
||||
@@ -61,17 +62,18 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup NodeJS
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-verison: '12.x'
|
||||
node-verison: 12
|
||||
check-latest: true
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.14'
|
||||
|
||||
- name: Build binary
|
||||
run: make build
|
||||
- name: Build wg-ui
|
||||
run: |
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
make build
|
||||
|
||||
- name: Check binary
|
||||
run: file bin/wireguard-ui
|
||||
|
||||
Reference in New Issue
Block a user