Update module github.com/stretchr/testify to v1.10.0 #982
Workflow file for this run
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: Test, Lint | |
on: | |
push: | |
pull_request_target: | |
env: | |
GO_VERSION: "1.21" | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' || github.event.pull_request.base.repo.full_name != github.event.pull_request.head.repo.full_name }} | |
steps: | |
- name: Setup Go ${{ env.GO_VERSION }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Go modules | |
uses: actions/[email protected] | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-${{ env.GO_VERSION }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.GO_VERSION }}-go- | |
- name: Run tests | |
run: go test -race -covermode=atomic ./... | |
lint: | |
name: Run linter | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' || github.event.pull_request.base.repo.full_name != github.event.pull_request.head.repo.full_name }} | |
steps: | |
- name: Setup Go ${{ env.GO_VERSION }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Go modules | |
uses: actions/[email protected] | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-${{ env.GO_VERSION }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.GO_VERSION }}-go- | |
- name: Run linter | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
skip-cache: true |