Build and Test #99
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
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 1,11,21 * *" | |
name: "Build and Test" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: | |
- 1.16.x | |
- 1.17.x | |
- 1.18.x | |
- 1.19.x | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Test | |
run: go test ./... | |
- name: Test coverage | |
run: go test -coverprofile="cover.out" ./... # quotes needed for powershell | |
- name: Send coverage | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: cover.out | |
flag-name: go${{ matrix.go-version }}-${{ matrix.os }} | |
parallel: true | |
# notifies that all test jobs are finished. | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: shogo82148/actions-goveralls@v1 | |
with: | |
parallel-finished: true |