Bump codecov/codecov-action from 4 to 5 #248
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: | |
- "stable" | |
- "1.23" | |
- "1.22" | |
- "1.21" | |
- "1.20" | |
- "1.19" | |
- "1.18" | |
- "1.17" | |
- "1.16" | |
- "1.15" | |
- "1.14" | |
- "1.13" | |
- "1.12" | |
- "1.11" | |
# old Go versions doesn't support macos-latest | |
exclude: | |
- os: macos-latest | |
go: "1.15" | |
- os: macos-latest | |
go: "1.14" | |
- os: macos-latest | |
go: "1.13" | |
- os: macos-latest | |
go: "1.12" | |
- os: macos-latest | |
go: "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@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
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 |