Added a GitHub action for running tests #1
Workflow file for this run
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 and coverage report | |
on: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Distribution source checkout | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Retrieve Go dependencies | |
run: | | |
go mod download | |
- name: Run tests and generate coverage report | |
run: | | |
go test -race -coverprofile=coverage.txt -covermode=atomic ./... | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_ORG_TOKEN }} |