mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-23 05:08:13 -05:00
27 lines
545 B
YAML
27 lines
545 B
YAML
name: Run Tests on PR
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GO111MODULE: on
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "^1.21.3"
|
|
- name: Unit test
|
|
run: |
|
|
go test -v ./...
|
|
- name: Build test
|
|
run: |
|
|
go build cmd/dashboard/main.go
|
|
- name: Run Gosec Security Scanner
|
|
uses: securego/gosec@master
|
|
with:
|
|
args: --exclude=G104 ./...
|