Update README.md #293
Workflow file for this run
This file contains hidden or 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 | |
on: [ push, pull_request ] | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.24.2' # Explicitly set Go version | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v8 | |
with: | |
version: v2.1.6 # Latest stable version as of the search results:cite[2]:cite[3] | |
build: | |
name: Go build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
go-version: 1.24.2 | |
- name: Build | |
run: | | |
git clone --depth=1 https://github.com/${GITHUB_REPOSITORY} | |
cd $(basename ${GITHUB_REPOSITORY}) | |
go build -v -race | |
test: | |
name: Go test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
go-version: 1.24.2 | |
- name: go get & test | |
run: | | |
go get -v -t -d ./... | |
go test -v ./... | |
- name: Generate coverage report | |
run: sh ./.github/scripts/coverage.sh | |
shell: bash | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.out | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: false # optional (default = false) | |
verbose: true # optional (default = false) |