Merge pull request #18 from cjkreklow/readme #31
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] | |
env: | |
GO111MODULE: on | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ 'stable', 'oldstable' ] | |
name: Go ${{ matrix.go }} | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run Tests | |
run: go test -v -race ./... | |
codecov: | |
needs: test | |
runs-on: ubuntu-latest | |
name: Codecov | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run Tests | |
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
file: ./coverage.txt | |
token: ${{ secrets.CODECOV_TOKEN }} |