2021-09-04 12:18:12 +08:00
|
|
|
name: Run Test
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GO111MODULE: on
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Unit test
|
|
|
|
run: |
|
|
|
|
go test -v ./...
|
2021-09-04 12:19:59 +08:00
|
|
|
- name: Build test
|
|
|
|
run: |
|
|
|
|
go build cmd/dashboard/main.go
|
|
|
|
go build cmd/agent/main.go
|
2021-09-04 12:18:12 +08:00
|
|
|
- name: Run Gosec Security Scanner
|
|
|
|
uses: securego/gosec@master
|
|
|
|
with:
|
2021-09-04 12:42:51 +08:00
|
|
|
args: -exclude=G104 ./...
|