Skip to content

feat(wf): Initial workflows #1

feat(wf): Initial workflows

feat(wf): Initial workflows #1

name: Pre-commit hooks
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
# We're basically using the same steps as here - https://github.com/pre-commit/action/blob/main/action.yml
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: "stable"
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: python -m pip install pre-commit
- run: pre-commit run --all-files --show-diff-on-failure --color=always
shell: bash