Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run pre-commit as part of CI #47

Merged
merged 8 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@ env:
GOPATH: ${{ github.workspace }}

jobs:
golangci-lint:
name: GolangCI Lint
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.62.2
pre-commit:
name: Pre-commit
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v3
- name: Setup Pre-commit
run: pip install pre-commit
- name: Install pre-commit
run: pre-commit install
- name: Run all pre-commit hooks
run: SKIP=golangci-lint pre-commit run --all-files
build:
runs-on: ubuntu-24.04
steps:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ env:
GOPATH: ${{ github.workspace }}

jobs:
golangci-lint:
name: GolangCI Lint
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.62.2
pre-commit:
name: Pre-commit
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v3
- name: Setup Pre-commit
run: pip install pre-commit
- name: Install pre-commit
run: pre-commit install
- name: Run all pre-commit hooks
run: SKIP=golangci-lint pre-commit run --all-files
build-release:
name: Release pushed tag
runs-on: ubuntu-24.04
Expand Down