Bump codecov/codecov-action from 4 to 5 (#40) #102
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: CI | |
on: | |
workflow_call: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: {} | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: read | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run Tests | |
run: go test -race ./... | |
fuzz: | |
name: Fuzz | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
fuzz-target: | |
- FuzzTake | |
- FuzzExact | |
- FuzzExactCaseInsensitive | |
- FuzzChar | |
- FuzzTakeWhile | |
- FuzzTakeUntil | |
- FuzzTakeWhileBetween | |
- FuzzTakeTo | |
- FuzzOneOf | |
- FuzzNoneOf | |
- FuzzAnyOf | |
- FuzzNotAnyOf | |
- FuzzOptional | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run Fuzz Tests | |
run: go test -fuzz "^${{ matrix.fuzz-target }}$" -fuzztime 1m | |
cov: | |
name: CodeCov | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Run Tests | |
run: go test -race -cover -covermode=atomic -coverprofile=./coverage.out ./... | |
- name: Coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
files: ./coverage.out | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Clean Mod Cache # See https://github.com/golangci/golangci-lint-action/issues/135 | |
run: go clean -modcache | |
- name: Run Linting | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest |