fix: try fixing ci #47
Workflow file for this run
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: | |
branches: '**' | |
paths-ignore: | |
- 'docs/**' | |
pull_request: | |
branches: '**' | |
paths-ignore: | |
- 'docs/**' | |
name: Build | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.18' | |
cache: true | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
# Require: The version of golangci-lint to use. | |
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. | |
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. | |
version: v1.57 | |
test: | |
env: | |
GOPATH: ${{ github.workspace }} | |
defaults: | |
run: | |
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
strategy: | |
matrix: | |
go-version: [1.18.x, stable] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
check-latest: true | |
cache: false | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }} | |
- name: Test | |
run: go list -f '{{.Dir}}' -m | |
test-coverage: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
check-latest: true | |
cache: true | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Test | |
run: go test -coverprofile=coverage.txt ./... | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v4 | |
continue-on-error: true | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
file: ./coverage.txt | |
fail_ci_if_error: false |