tx: thin wrapper around shared driver interfaces #69
This file contains hidden or 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: Run checks | |
on: | |
push: | |
pull_request: | |
env: | |
GO_VERSION: 1.24 | |
CODESPELL_VERSION: v2.4.1 | |
jobs: | |
golangci-lint: | |
runs-on: ubuntu-latest | |
if: | | |
github.event_name == 'push' || | |
github.event_name == 'pull_request' && | |
github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: golangci/golangci-lint-action@v8 | |
name: run golangci-lint with gha format | |
continue-on-error: true | |
- uses: golangci/golangci-lint-action@v8 | |
name: run golangci-lint with human-readable format | |
codespell: | |
runs-on: ubuntu-latest | |
if: | | |
github.event_name == 'push' || | |
github.event_name == 'pull_request' && | |
github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install codespell | |
run: pip3 install codespell==${CODESPELL_VERSION} | |
- name: run codespell | |
run: make codespell | |
verify-generation: | |
runs-on: ubuntu-latest | |
if: | | |
github.event_name == 'push' || | |
github.event_name == 'pull_request' && | |
github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: generate code | |
run: go generate ./... | |
- name: check for changes | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "new files were generated" | |
git status --porcelain | |
git diff | |
exit 1 | |
fi |