This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 #9
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: lint | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
cache: true | |
- name: Run Make commands | |
run: | | |
make generate | |
make lint-fix | |
make lint | |
- name: Check for changes | |
id: check-changed-files | |
uses: tj-actions/[email protected] | |
with: | |
files: | | |
* | |
- name: Diff | |
if: steps.check-changed-files.outputs.files_changed == 'true' | |
run: git diff | |
- name: Fail if code needs linting | |
if: steps.check-changed-files.outputs.files_changed == 'true' | |
run: | | |
echo "Changed files: ${{ steps.check-changed-files.outputs.changed_files }}" | |
echo "Run make lint-fix or make generate to attempt to fix linter errors." | |
exit 1 |