Merge pull request #10 from emmansun/dependabot/go_modules/golang.org… #33
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: ci | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goVer: ['1.18', '1.20'] | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.goVer }} | |
- name: Test with Coverage | |
run: go test -coverpkg=./... -v -short -coverprofile=coverage1.txt -covermode=atomic ./... | |
- name: Test Generic | |
run: go test -coverpkg=./... -v -short -tags purego -coverprofile=coverage2.txt -covermode=atomic ./... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage1.txt,./coverage2.txt |