ci: 1 #15
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: Utils Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
paths: | |
- 'utils/**' | |
- '.github/workflows/utils-test.yml' | |
- 'go.mod' | |
- 'go.sum' | |
jobs: | |
test: | |
name: Run Utils Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
cache: false | |
- name: Verify dependencies | |
run: go mod verify | |
- name: Install dependencies | |
run: | | |
go mod tidy | |
go mod download | |
- name: Run utils tests | |
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./utils/... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.txt | |
flags: utils | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
verbose: true |