Skip to content

Commit

Permalink
ci(workflow): Update GitHub Actions workflow
Browse files Browse the repository at this point in the history
Reorganized the workflow to separate linter and test jobs, updated Go versions, and added matrix for testing different Go versions.
  • Loading branch information
tab committed Nov 1, 2024
1 parent ab0a85a commit f0b158c
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,43 @@ concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
coverage:
name: Codecov
linter:
name: Golang CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23.1'
- name: Run coverage
run: go test ./... -race -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
linter:
name: Golang CI
version: v1.60
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [1.22, 1.23]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: go test ./...
coverage:
name: Codecov
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23.1'
- name: Run linter
uses: golangci/golangci-lint-action@v6
- name: Run coverage
run: go test ./... -race -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
version: v1.60
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit f0b158c

Please sign in to comment.