Merge pull request #193 from siyuanfoundation/bump #645
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: Static analysis | |
on: [push, pull_request] | |
permissions: read-all | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version-file: go.mod | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 | |
with: | |
version: v1.60.1 | |
args: --config tools/.golangci.yaml | |
- run: | | |
set -euo pipefail | |
make verify | |
- run: | | |
set -euo pipefail | |
make fmt | |
DIFF=$(git status --porcelain) | |
if [ -n "$DIFF" ]; then | |
echo "These files were modified:" | |
echo | |
echo "$DIFF" | |
echo | |
exit 1 | |
fi |