Skip to content

Commit e7de5d0

Browse files
committed
chore(ci): remove Go versions below 1.24 from CI matrix
Remove CI test runs for Go 1.21.x, 1.22.x, and 1.23.x as the minimum supported version is 1.24.0 (as defined in go.mod). This change: - Removes outdated Go versions from the test matrix - Aligns CI testing with the minimum supported version - Reduces CI execution time by removing unnecessary test runs - Maintains testing coverage for supported versions (1.24.x, 1.25.x) fix(ci): remove impossible dependencies from docker job The docker job runs on push events to master/develop branches, but it was depending on docker-test and dependency-review jobs which only run on pull_request events. This created an impossible dependency chain that prevented the docker job from ever running. This change: - Removes docker-test and dependency-review from docker job dependencies - Keeps only the test job as a dependency (which runs on both events) - Allows docker build & push to run correctly on push events - Maintains PR-specific checks (docker-test, dependency-review) for PRs chore(tooling): add pre-commit configuration Introduces a `.pre-commit-config.yaml` file to automate code quality checks before commits. This configuration includes standard hooks for file hygiene (e.g., trailing whitespace, end-of-file fixes) and integrates `golangci-lint` to lint and format Go code on staged files. This helps enforce code style and catch issues early in the development process.
1 parent bd308e4 commit e7de5d0

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ jobs:
3838
strategy:
3939
matrix:
4040
go:
41-
- 1.21.x
42-
- 1.22.x
43-
- 1.23.x
4441
- 1.24.x
4542
- 1.25.x
4643

@@ -357,7 +354,7 @@ jobs:
357354
permissions:
358355
contents: read
359356
packages: write
360-
needs: [test, docker-test, dependency-review]
357+
needs: [test]
361358
if: |
362359
github.event_name == 'push' && (github.ref == 'refs/heads/master' ||
363360
github.ref == 'refs/heads/develop' ||

.pre-commit-config.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v6.0.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/golangci/golangci-lint
12+
rev: v2.6.1
13+
hooks:
14+
- id: golangci-lint
15+
name: golangci-lint
16+
description: Fast linters runner for Go. Note that only modified files are linted, so linters like 'unused' that need to scan all files won't work as expected.
17+
entry: golangci-lint run --new-from-rev HEAD --fix
18+
types: [go]
19+
language: golang
20+
require_serial: true
21+
pass_filenames: false
22+
# - id: golangci-lint-full
23+
# name: golangci-lint-full
24+
# description: Fast linters runner for Go. Runs on all files in the module. Use this hook if you use pre-commit in CI.
25+
# entry: golangci-lint run --fix
26+
# types: [go]
27+
# language: golang
28+
# require_serial: true
29+
# pass_filenames: false
30+
- id: golangci-lint-fmt
31+
name: golangci-lint-fmt
32+
description: Fast linters runner for Go. Formats all files in the repo.
33+
entry: golangci-lint fmt
34+
types: [go]
35+
language: golang
36+
require_serial: true
37+
pass_filenames: false
38+
- id: golangci-lint-config-verify
39+
name: golangci-lint-config-verify
40+
description: Verifies the configuration file
41+
entry: golangci-lint config verify
42+
files: '\.golangci\.(?:yml|yaml|toml|json)'
43+
language: golang
44+
pass_filenames: false

0 commit comments

Comments
 (0)