nezha/.github/workflows/test.yml
2021-11-04 12:55:12 +08:00

36 lines
761 B
YAML

name: Run Tests
on:
push:
branches:
- master
paths-ignore:
- ".github/workflows/agent.yml"
- ".github/workflows/test-on-pr.yml"
- "README.md"
- ".goreleaser.yml"
jobs:
tests:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v2
- run: go version
- uses: actions/setup-go@v2
with:
go-version: '^1.17.2'
- run: go version
- name: Unit test
run: |
go test -v ./...
- name: Build test
run: |
go build cmd/dashboard/main.go
go build cmd/agent/main.go
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: -exclude=G104 ./...