Update LICENSE #106
Workflow file for this run
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: [ main develop] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install dependencies | |
| run: sudo apt update -y -qq && sudo apt install -y -qq libsnmp-dev gcc libc-dev | |
| - name: Install Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.18 | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: WriteGoList | |
| run: go list -json -m all > go.list | |
| - name: nancy | |
| uses: sonatype-nexus-community/nancy-github-action@main | |
| with: | |
| nancyCommand: sleuth --exclude-vulnerability CVE-2020-15114,CVE-2020-15136,CVE-2020-15115,CVE-2020-26160,CVE-2022-29153,CVE-2022-24687,sonatype-2019-0890,sonatype-2019-0702,CVE-2021-41803 | |
| - name: Unit Tests | |
| run: | | |
| go test -race -cover -coverprofile=coverage.txt -covermode=atomic -cpu 1,2 -bench . -benchmem > test.log | |
| cat test.log | |
| - name: Failed Logs | |
| if: failure() | |
| run: | | |
| cat test.log | |
| - name: CodeCov | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| file: ./coverage.txt | |
| # Publish benchmarks for the master branch only | |
| - name: Store Benchmark Result | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| uses: rhysd/github-action-benchmark@v1 | |
| with: | |
| # What benchmark tool the output.txt came from | |
| tool: "go" | |
| # Where the output from the benchmark tool is stored | |
| output-file-path: test.log | |
| # Push and deploy GitHub pages branch automatically | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: true | |
| # Updating go report card for master branch only | |
| - name: GoReportCard | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| run: curl --fail --request POST "https://goreportcard.com/checks" --data "repo=github.com/timdrysdale/relay" |