multinet/.forgejo/workflows/pre-commit.yml
Dmitrii Stepanov c4a6d20d37
All checks were successful
Tests and linters / Tests with -race (pull_request) Successful in 26s
Pre-commit hooks / Pre-commit (pull_request) Successful in 51s
Vulncheck / Vulncheck (pull_request) Successful in 45s
Tests and linters / Tests (pull_request) Successful in 1m3s
DCO action / DCO (pull_request) Successful in 1m10s
Tests and linters / gopls check (pull_request) Successful in 1m6s
Tests and linters / Run gofumpt (pull_request) Successful in 1m15s
Tests and linters / Staticcheck (pull_request) Successful in 1m26s
Tests and linters / Lint (pull_request) Successful in 2m4s
[#11] .forgejo: Add CI/CD checks
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-10-09 16:30:12 +03:00

25 lines
790 B
YAML

name: Pre-commit hooks
on: [pull_request]
jobs:
precommit:
name: Pre-commit
env:
# Skip pre-commit hooks which are executed by other actions.
SKIP: make-lint,go-staticcheck-repo-mod,go-unit-tests,gofumpt
runs-on: ubuntu-22.04
# If we use actions/setup-python from either Github or Gitea,
# the line above fails with a cryptic error about not being able to find python.
# So install everything manually.
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.23
- name: Set up Python
run: |
apt update
apt install -y pre-commit
- name: Run pre-commit
run: pre-commit run --color=always --hook-stage manual --all-files