Merge pull request #58 from nitram509/dependabot/go_modules/golang.or… #262
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: go test | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
include: | |
- os: ubuntu-latest | |
upload-coverage: true | |
runs-on: ${{ matrix.os }} | |
name: "go test" | |
steps: | |
- name: "checkout" | |
uses: actions/checkout@v3 | |
- name: "setup go" | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.20' | |
- name: "go mod download" | |
run: "go mod download" | |
- name: "go test ./..." | |
run: "go test -race '-coverprofile=coverage.txt' '-covermode=atomic' ./..." | |
- if: ${{ matrix.upload-coverage }} | |
name: verify codecov.yaml | |
run: curl -X POST --data-binary @codecov.yml https://codecov.io/validate | |
- if: ${{ matrix.upload-coverage }} | |
name: upload code coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.txt | |
name: codecov-umbrella # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) |