chore: bump versions and run concurrency #1009
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: Test | |
on: | |
push: | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
concurrency: ci-${{ github.ref }} | |
steps: | |
- name: Install bgpq4 | |
run: | | |
wget http://ftp.us.debian.org/debian/pool/main/b/bgpq4/bgpq4_0.0.6-2_amd64.deb | |
sudo dpkg -i bgpq4*.deb | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Install pre-commit deps | |
run: | | |
sudo apt install -y pre-commit python3-flask | |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | |
go install golang.org/x/tools/cmd/goimports@latest | |
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest | |
go install -v github.com/go-critic/go-critic/cmd/gocritic@latest | |
- name: Hash key for Cache pre-commit | |
uses: seepine/hash-files@v1 | |
id: key-hash | |
with: | |
patterns: ".pre-commit-config.yaml" | |
- name: Cache pre-commit | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit/ | |
key: pre-commit-${{ steps.key-hash.outputs.hash }} | |
- run: pre-commit run --all-files | |
- run: go generate -x | |
- run: go build -v . | |
- run: make test-setup | |
- run: make test | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.txt | |
- run: make test-teardown |