Small quality of life of fixes #40
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: Code Analysis | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
go: [1.20] | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ">=1.20" | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Run staticcheck | |
continue-on-error: true | |
uses: dominikh/staticcheck-action@v1.2.0 | |
with: | |
checks: all | |
version: "latest" | |
install-go: false | |
cache-key: ${{ matrix.go }} | |
working-directory: ${{ matrix.dir }} | |
- name: Run Tests | |
run: | | |
go test ./... | |
- name: Generate Coverage Profile | |
run: | | |
go test -cover ./... -coverprofile coverage.txt -coverpkg ./... | |
- name: Upload coverage reports to Codecov | |
run: | | |
curl -Os https://uploader.codecov.io/latest/linux/codecov | |
chmod +x codecov | |
./codecov --file coverage.txt |