Skip to content

Commit 01d03f4

Browse files
committed
WIP: updates to gh action stuff
1 parent f40f9ae commit 01d03f4

File tree

3 files changed

+275
-190
lines changed

3 files changed

+275
-190
lines changed

.github/workflows/test.yaml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -81,57 +81,6 @@ jobs:
8181
path: envtest-existing.coverage.gz
8282
retention-days: 1
8383

84-
e2e-k3d-chainsaw:
85-
runs-on: ubuntu-24.04
86-
needs: [go-test]
87-
strategy:
88-
fail-fast: false
89-
matrix:
90-
kubernetes: [v1.30, v1.34]
91-
steps:
92-
- uses: actions/checkout@v5
93-
- uses: actions/setup-go@v6
94-
with: { go-version: stable }
95-
96-
- name: Start k3s
97-
uses: ./.github/actions/k3d
98-
with:
99-
k3s-channel: "${{ matrix.kubernetes }}"
100-
prefetch-images: |
101-
registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2547
102-
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.7-2547
103-
104-
- name: Get pgMonitor files.
105-
run: make get-pgmonitor
106-
env:
107-
PGMONITOR_DIR: "${{ github.workspace }}/hack/tools/pgmonitor"
108-
QUERIES_CONFIG_DIR: "${{ github.workspace }}/hack/tools/queries"
109-
110-
# Start a Docker container with the working directory mounted.
111-
- run: make build BUILDAH=docker
112-
- name: Start PGO
113-
run: |
114-
kubectl apply --server-side -k ./config/namespace
115-
kubectl apply --server-side -k ./config/dev
116-
hack/create-kubeconfig.sh postgres-operator pgo
117-
docker run --detach --network host --read-only \
118-
--volume "$(pwd):/mnt" --workdir '/mnt' \
119-
--env 'QUERIES_CONFIG_DIR=/mnt/hack/tools/queries' \
120-
--env 'KUBECONFIG=hack/.kube/postgres-operator/pgo' \
121-
--env 'RELATED_IMAGE_PGBACKREST=registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2547' \
122-
--env 'RELATED_IMAGE_POSTGRES_17=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.7-2547' \
123-
--env 'PGO_FEATURE_GATES=TablespaceVolumes=true,OpenTelemetryLogs=true,OpenTelemetryMetrics=true' \
124-
--name 'postgres-operator' localhost/postgres-operator
125-
126-
- run: |
127-
make check-chainsaw && exit
128-
failed=$?
129-
echo '::group::PGO logs'; docker logs 'postgres-operator'; echo '::endgroup::'
130-
exit $failed
131-
132-
- name: Stop PGO
133-
run: docker stop 'postgres-operator' || true
134-
13584
e2e-k3d-kuttl:
13685
runs-on: ubuntu-24.04
13786
needs: [go-test]

.golangci.next.yaml

Lines changed: 86 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,98 @@
1-
# https://golangci-lint.run/usage/configuration/
1+
# https://golangci-lint.run/usage/configuration
22
#
33
# This file is for linters that might be interesting to enforce in the future.
44
# Rules that should be enforced immediately belong in [.golangci.yaml].
55
#
66
# Both files are used by [.github/workflows/lint.yaml].
7+
version: "2"
78

9+
# https://golangci-lint.run/usage/linters
810
linters:
9-
disable-all: true
10-
enable:
11-
- contextcheck
12-
- err113
13-
- gocritic
14-
- godot
15-
- godox
16-
- gofumpt
17-
- gosec # exclude-use-default
18-
- nilnil
11+
default: all
12+
disable:
13+
- asasalint
14+
- asciicheck
15+
- bidichk
16+
- bodyclose
17+
- copyloopvar
18+
- depguard
19+
- dupword
20+
- durationcheck
21+
- errchkjson
22+
- errname
23+
- errorlint
24+
- exhaustive
25+
- exptostd
26+
- fatcontext
27+
- forbidigo
28+
- ginkgolinter
29+
- gocheckcompilerdirectives
30+
- gochecksumtype
31+
- goheader
32+
- gomoddirectives
33+
- gomodguard
34+
- goprintffuncname
35+
- gosmopolitan
36+
- grouper
37+
- iface
38+
- importas
39+
- interfacebloat
40+
- intrange
41+
- loggercheck
42+
- makezero
43+
- mirror
44+
- misspell
45+
- musttag
46+
- nilerr
47+
- nilnesserr
48+
- noctx
1949
- nolintlint
20-
- predeclared
21-
- revive
22-
- staticcheck # exclude-use-default
23-
- tenv
24-
- thelper
25-
- tparallel
50+
- nosprintfhostport
51+
- prealloc
52+
- promlinter
53+
- protogetter
54+
- reassign
55+
- recvcheck
56+
- rowserrcheck
57+
- sloglint
58+
- spancheck
59+
- sqlclosecheck
60+
- tagalign
61+
- testifylint
62+
- unconvert
63+
- unparam
64+
- usestdlibvars
65+
- usetesting
2666
- wastedassign
67+
- wsl
68+
- zerologlint
2769

28-
issues:
29-
exclude-rules:
30-
# We call external linters when they are installed: Flake8, ShellCheck, etc.
31-
- linters: [gosec]
32-
path: '_test[.]go$'
33-
text: 'G204: Subprocess launched with variable'
70+
settings:
71+
thelper:
72+
# https://github.com/kulti/thelper/issues/27
73+
tb: { begin: true, first: true }
74+
test: { begin: true, first: true, name: true }
75+
76+
exclusions:
77+
warn-unused: true
78+
# Ignore built-in exclusions
79+
presets: []
80+
rules:
81+
# We call external linters when they are installed: Flake8, ShellCheck, etc.
82+
- linters: [gosec]
83+
path: '_test[.]go$'
84+
text: 'G204: Subprocess launched with variable'
3485

35-
# https://github.com/golangci/golangci-lint/issues/2239
36-
exclude-use-default: false
86+
# https://golangci-lint.run/usage/formatters
87+
formatters:
88+
enable:
89+
- gofumpt
90+
91+
issues:
92+
# Fix only when requested
93+
fix: false
3794

38-
linters-settings:
39-
thelper:
40-
# https://github.com/kulti/thelper/issues/27
41-
tb: { begin: true, first: true }
42-
test: { begin: true, first: true, name: true }
95+
# Show all issues at once
96+
max-issues-per-linter: 0
97+
max-same-issues: 0
98+
uniq-by-line: false

0 commit comments

Comments
 (0)