34 lines
763 B
YAML
34 lines
763 B
YAML
name: Run Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- ".github/workflows/codeql-analysis.yml"
|
|
- ".github/workflows/test-on-pr.yml"
|
|
- ".github/workflows/contributors.yml"
|
|
- "README.md"
|
|
- ".goreleaser.yml"
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GO111MODULE: on
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "^1.20.0"
|
|
- name: Unit test
|
|
run: |
|
|
go test -v ./...
|
|
- name: Build test
|
|
run: |
|
|
go build cmd/dashboard/main.go
|
|
- name: Run Gosec Security Scanner
|
|
run: |
|
|
go install github.com/securego/gosec/v2/cmd/gosec@latest
|
|
gosec -exclude=G104 ./...
|