Bump codecov/codecov-action from 3 to 5 #276
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: build & test | |
on: | |
push: | |
branches: main | |
paths: | |
- '**.go' | |
- .github/workflows/build-test.yml | |
- 'go.mod' | |
- 'go.sum' | |
pull_request: | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- 'go.sum' | |
- .github/workflows/build-test.yml | |
jobs: | |
build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
- name: build | |
shell: bash | |
run: | | |
make build | |
- name: test | |
shell: bash | |
run: | | |
make test | |
env: | |
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}} | |
- name: lint | |
shell: bash | |
run: | | |
go get golang.org/x/lint/golint | |
make lint | |
- name: vet | |
shell: bash | |
run: | | |
make vet | |
- name: fmt | |
shell: bash | |
run: | | |
make fmt | |
- name: make test coverage | |
shell: bash | |
run: | | |
make cover | |
env: | |
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
flags: unittests | |
files: ${{ github.workspace }}/coverage.txt | |
verbose: true |