2021-09-04 00:51:02 -04:00
|
|
|
name: Run Tests
|
|
|
|
|
2021-09-04 00:18:12 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-11-03 09:40:22 -04:00
|
|
|
paths-ignore:
|
|
|
|
- ".github/workflows/agent.yml"
|
|
|
|
- ".github/workflows/test-on-pr.yml"
|
|
|
|
- "README.md"
|
|
|
|
- ".goreleaser.yml"
|
|
|
|
|
2021-09-04 00:18:12 -04:00
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GO111MODULE: on
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-11-04 00:55:12 -04:00
|
|
|
- run: go version
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: '^1.17.2'
|
|
|
|
- run: go version
|
2021-09-04 00:18:12 -04:00
|
|
|
- name: Unit test
|
|
|
|
run: |
|
|
|
|
go test -v ./...
|
2021-09-04 00:19:59 -04:00
|
|
|
- name: Build test
|
|
|
|
run: |
|
|
|
|
go build cmd/dashboard/main.go
|
|
|
|
go build cmd/agent/main.go
|
2021-09-04 00:18:12 -04:00
|
|
|
- name: Run Gosec Security Scanner
|
|
|
|
uses: securego/gosec@master
|
|
|
|
with:
|
2021-09-04 00:42:51 -04:00
|
|
|
args: -exclude=G104 ./...
|