Bump the github-actions group with 3 updates #89
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: Workflow for CI | |
on: [ push, pull_request ] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [ '1.21', '1.22', '1.23' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Ensure the Go module is nice and tidy | |
run: | | |
go mod tidy && git diff --exit-code go.mod go.sum | |
# We set the shell explicitly, here, and in other golang test actions, | |
# as by default multi-line shell scripts do not error out on the first | |
# failed command. Since we want an error reported if any of the lines | |
# fail, we set the shell explicitly: | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions?ref=cloudtechsimplified.com#exit-codes-and-error-action-preference | |
shell: bash | |
- name: Install Tools | |
run: | | |
pushd "$(mktemp -d)" | |
go mod init example.com/m # fake module | |
go install github.com/onsi/ginkgo/v2/[email protected] | |
go install honnef.co/go/tools/cmd/[email protected] | |
popd | |
shell: bash | |
- name: Verify Go Modules Setup | |
run: go mod verify | |
shell: bash | |
- name: Build | |
run: go build -v ./... | |
shell: bash | |
- name: Sanity Check (staticcheck) | |
run: staticcheck ./... | |
shell: bash | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
- name: Test | |
run: ginkgo -v -race -coverprofile=coverage.out -coverpkg=./... ./... | |
shell: bash | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: maguro/gslog | |
flags: smart-tests | |
verbose: true | |