Merge pull request #92 from shogo82148/dependabot/github_actions/acti… #239
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: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
go: | |
- "1" | |
- "1.20" | |
- "1.19" | |
- "1.18" | |
- "1.17" | |
- "1.16" | |
- "1.15" | |
- "1.14" | |
- "1.13" | |
- "1.12" | |
- "1.11" | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Set up Go ${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Test | |
run: go test -v -coverprofile=coverage.txt . | |
shell: bash | |
- name: Send coverage to coveralls.io | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: coverage.txt | |
parallel: true | |
flag-name: ${{ matrix.os }}-Go-${{ matrix.go }} | |
- name: Send coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
env_vars: OS,GO | |
root_dir: . | |
env: | |
OS: ${{ matrix.os }} | |
GO: ${{ matrix.go }} | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: finish | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
parallel-finished: true |