downgrade some dependencies to the compatible version #139
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests on PR | |
on: | |
pull_request: | |
branches: | |
- main | |
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 | |
# Skip TestCloudflareDetection here, as most IP addresses of Github's action | |
# runners have been marked as bot. | |
run: | | |
go test -skip TestCloudflareDetection -v ./... | |
- name: Build test | |
run: | | |
go build ./cmd/agent | |
#- 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 |