update ci

This commit is contained in:
naiba 2021-09-04 12:51:02 +08:00
parent e40026f6cc
commit bb55c3354a
3 changed files with 31 additions and 15 deletions

View File

@ -1,17 +1,11 @@
name: Dashboard image
on:
push:
branches:
- "master"
paths-ignore:
- "cmd/playground/**"
- "cmd/agent/**"
- "script/**"
- "*.md"
- ".*"
- ".github/workflows/agent.yml"
- ".github/workflows/test.yml"
workflow_run:
workflows: ["Run Tests"]
branches: [master]
types:
- completed
jobs:
deploy:

24
.github/workflows/test-on-pr.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Run Tests on PR
on:
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: 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 ./...

View File

@ -1,11 +1,9 @@
name: Run Test
name: Run Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest