nezha/.github/workflows/test-on-pr.yml

27 lines
612 B
YAML
Raw Normal View History

2021-09-04 00:51:02 -04:00
name: Run Tests on PR
on:
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v2
2021-11-04 00:55:12 -04:00
- uses: actions/setup-go@v2
with:
2022-03-22 06:46:18 -04:00
go-version: "^1.18.0"
2021-09-04 00:51:02 -04:00
- 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
2021-11-04 01:02:07 -04:00
run: |
go install github.com/securego/gosec/v2/cmd/gosec@latest
gosec -exclude=G104 ./...