👷 [skip ci] gosec code scanner
This commit is contained in:
parent
20ea31140b
commit
3f76e700d2
6
.github/workflows/dashboard.yml
vendored
6
.github/workflows/dashboard.yml
vendored
@ -11,6 +11,7 @@ on:
|
||||
- "*.md"
|
||||
- ".*"
|
||||
- ".github/workflows/agent.yml"
|
||||
- ".github/workflows/gosec.yml"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@ -38,11 +39,6 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Code Test
|
||||
run: |
|
||||
go env
|
||||
go test -v ./...
|
||||
|
||||
- name: Set up image name
|
||||
run: |
|
||||
GHRC_IMAGE_NAME=$(echo "ghcr.io/${{ github.repository_owner }}/nezha-dashboard" | tr '[:upper:]' '[:lower:]')
|
||||
|
22
.github/workflows/test.yml
vendored
Normal file
22
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: Run Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GO111MODULE: on
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Unit test
|
||||
run: |
|
||||
go test -v ./...
|
||||
- name: Run Gosec Security Scanner
|
||||
uses: securego/gosec@master
|
||||
with:
|
||||
args: ./...
|
Loading…
x
Reference in New Issue
Block a user