Skip to content

fix: store protocols.json in cache #979

fix: store protocols.json in cache

fix: store protocols.json in cache #979

Workflow file for this run

name: Test
on:
push:
pull_request:
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Install bgpq4 and bird2
run: |
wget http://ftp.us.debian.org/debian/pool/main/b/bgpq4/bgpq4_0.0.6-2_amd64.deb
sudo dpkg -i bgpq4*.deb
sudo apt install -y bird2
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: actions/checkout@v3
- name: Install pre-commit deps
run: |
pip install --user pre-commit 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: sudo chown $(whoami):$(whoami) /run/bird/bird.ctl
- run: sudo chown -R $(whoami):$(whoami) /etc/bird/
- 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