* Replace pflag with cobra, add service command moved '-c' option to 'edit' command * Restart after installation & add some friendly outputs * Attempt to fix ci * Update dependencies & revert gosec to 2.19.0 gosec 2.19.0 is the last version supports Go 1.20 * Remove gosec checks
40 lines
1020 B
YAML
40 lines
1020 B
YAML
name: Run Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- ".github/workflows/agent.yml"
|
|
- ".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
|
|
container:
|
|
image: goreleaser/goreleaser-cross:v1.20
|
|
steps:
|
|
- run: |
|
|
git config --global --add safe.directory /__w/agent/agent
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.20.13"
|
|
- name: Unit test
|
|
run: |
|
|
go test -v ./...
|
|
#- name: Run Gosec Security Scanner
|
|
# run: |
|
|
# go install github.com/securego/gosec/v2/cmd/gosec@v2.19.0
|
|
# gosec -exclude=G104 ./...
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: build --snapshot
|