Skip to content

Commit 741f453

Browse files
hallelx2claude
andcommitted
ci: add GitHub Actions workflow + golangci-lint + dependabot
Fills the previously-empty .github/workflows/ directory. CI jobs: - test: Go 1.25 matrix across ubuntu, macos, windows. Runs vet, build, and `go test -race`. Ubuntu also verifies go.mod/go.sum are tidy, so PRs don't sneak in untidied modules. - integration: Linux-only (Actions service containers are Linux-only). Spins up Postgres 16 + MinIO as services, exports TEST_DATABASE_URL and TEST_S3_* env vars, runs `go test -run Integration ./...`. This is where the River and S3 integration tests added earlier actually exercise real backends. - lint: staticcheck + golangci-lint. golangci config starts deliberately small (errcheck, govet, ineffassign, staticcheck, unused, misspell, bodyclose, unconvert) — the ones where a finding almost always means a real bug. Revive / gocritic stay off until we do a dedicated code-quality sweep; turning them on today would drown the first CI run in unrelated findings from existing code. - govulncheck: stdlib + deps vuln scan. Also adds dependabot weekly bumps for gomod + github-actions, with AWS and River grouped so we don't get ten separate PRs per release. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 8d8a838 commit 741f453

5 files changed

Lines changed: 197 additions & 7 deletions

File tree

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
groups:
8+
aws:
9+
patterns:
10+
- "github.com/aws/*"
11+
river:
12+
patterns:
13+
- "github.com/riverqueue/*"
14+
- package-ecosystem: github-actions
15+
directory: /
16+
schedule:
17+
interval: weekly

.github/workflows/ci.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
name: test (go ${{ matrix.go }} / ${{ matrix.os }})
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
go: ["1.25"]
21+
steps:
22+
- uses: actions/checkout@v6
23+
24+
- name: Set up Go
25+
uses: actions/setup-go@v6
26+
with:
27+
go-version: ${{ matrix.go }}
28+
cache: true
29+
30+
- name: Download modules
31+
run: go mod download
32+
33+
- name: Verify go.mod / go.sum are tidy
34+
if: matrix.os == 'ubuntu-latest'
35+
run: |
36+
go mod tidy
37+
git diff --exit-code -- go.mod go.sum
38+
39+
- name: Vet
40+
run: go vet ./...
41+
42+
- name: Build
43+
run: go build ./...
44+
45+
- name: Test (race)
46+
run: go test -race -count=1 -timeout=5m ./...
47+
48+
# Integration tests need service containers (Linux-only in Actions).
49+
# Split out from the matrix so it runs once against a real Postgres +
50+
# MinIO and gates on TEST_* env vars the same way a developer would.
51+
integration:
52+
name: integration (postgres + minio)
53+
runs-on: ubuntu-latest
54+
services:
55+
postgres:
56+
image: postgres:16
57+
env:
58+
POSTGRES_USER: vle
59+
POSTGRES_PASSWORD: vle
60+
POSTGRES_DB: vle_test
61+
ports: ["5432:5432"]
62+
options: >-
63+
--health-cmd "pg_isready -U vle -d vle_test"
64+
--health-interval 5s
65+
--health-timeout 5s
66+
--health-retries 10
67+
minio:
68+
image: bitnami/minio:latest
69+
env:
70+
MINIO_ROOT_USER: minioadmin
71+
MINIO_ROOT_PASSWORD: minioadmin
72+
MINIO_DEFAULT_BUCKETS: vle-test
73+
ports: ["9000:9000"]
74+
options: >-
75+
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
76+
--health-interval 5s
77+
--health-timeout 5s
78+
--health-retries 20
79+
steps:
80+
- uses: actions/checkout@v6
81+
82+
- name: Set up Go
83+
uses: actions/setup-go@v6
84+
with:
85+
go-version: "1.25"
86+
cache: true
87+
88+
- name: Run integration tests
89+
env:
90+
TEST_DATABASE_URL: postgres://vle:vle@localhost:5432/vle_test?sslmode=disable
91+
TEST_S3_ENDPOINT: http://localhost:9000
92+
TEST_S3_BUCKET: vle-test
93+
TEST_S3_ACCESS_KEY: minioadmin
94+
TEST_S3_SECRET_KEY: minioadmin
95+
TEST_S3_PATH_STYLE: "true"
96+
TEST_S3_REGION: us-east-1
97+
run: go test -count=1 -timeout=5m -run 'Integration' ./...
98+
99+
lint:
100+
name: lint
101+
runs-on: ubuntu-latest
102+
steps:
103+
- uses: actions/checkout@v6
104+
105+
- name: Set up Go
106+
uses: actions/setup-go@v6
107+
with:
108+
go-version: "1.25"
109+
cache: true
110+
111+
- name: staticcheck
112+
uses: dominikh/staticcheck-action@v1
113+
with:
114+
version: latest
115+
install-go: false
116+
117+
- name: golangci-lint
118+
uses: golangci/golangci-lint-action@v9
119+
with:
120+
version: latest
121+
args: --timeout=5m
122+
123+
govulncheck:
124+
name: govulncheck
125+
runs-on: ubuntu-latest
126+
steps:
127+
- uses: actions/checkout@v6
128+
- uses: actions/setup-go@v6
129+
with:
130+
go-version: "1.25"
131+
cache: true
132+
- name: Install govulncheck
133+
run: go install golang.org/x/vuln/cmd/govulncheck@latest
134+
- name: Scan
135+
run: govulncheck ./...

.golangci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: "2"
2+
3+
run:
4+
timeout: 5m
5+
tests: true
6+
7+
linters:
8+
# Start deliberately small. We'll tighten over time — revive,
9+
# gocritic, and the rest come back on once the existing tree is
10+
# swept clean. The linters enabled here are the ones where a finding
11+
# almost always indicates a real bug.
12+
default: none
13+
enable:
14+
- errcheck
15+
- govet
16+
- ineffassign
17+
- staticcheck
18+
- unused
19+
- misspell
20+
- bodyclose
21+
- unconvert
22+
exclusions:
23+
rules:
24+
- path: _test\.go
25+
linters: [errcheck]
26+
27+
formatters:
28+
enable:
29+
- gofmt
30+
- goimports
31+
settings:
32+
goimports:
33+
local-prefixes:
34+
- github.com/hallelx2/vectorless-engine

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@ module github.com/hallelx2/vectorless-engine
33
go 1.25.0
44

55
require (
6+
github.com/aws/aws-sdk-go-v2 v1.41.6
7+
github.com/aws/aws-sdk-go-v2/config v1.32.16
8+
github.com/aws/aws-sdk-go-v2/credentials v1.19.15
9+
github.com/aws/aws-sdk-go-v2/service/s3 v1.99.1
10+
github.com/aws/smithy-go v1.25.0
611
github.com/go-chi/chi/v5 v5.2.5
712
github.com/google/uuid v1.6.0
813
github.com/hallelx2/llmgate v0.0.0-00010101000000-000000000000
914
github.com/jackc/pgx/v5 v5.9.2
1015
github.com/ledongthuc/pdf v0.0.0-20250511090121-5959a4027728
16+
github.com/riverqueue/river v0.35.0
17+
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.35.0
1118
github.com/yuin/goldmark v1.8.2
1219
golang.org/x/net v0.53.0
1320
golang.org/x/sync v0.20.0
@@ -29,10 +36,7 @@ require (
2936
cloud.google.com/go/iam v1.2.2 // indirect
3037
cloud.google.com/go/longrunning v0.6.2 // indirect
3138
cloud.google.com/go/vertexai v0.12.0 // indirect
32-
github.com/aws/aws-sdk-go-v2 v1.41.6 // indirect
3339
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.9 // indirect
34-
github.com/aws/aws-sdk-go-v2/config v1.32.16 // indirect
35-
github.com/aws/aws-sdk-go-v2/credentials v1.19.15 // indirect
3640
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.22 // indirect
3741
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.22 // indirect
3842
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22 // indirect
@@ -41,12 +45,10 @@ require (
4145
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.14 // indirect
4246
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.22 // indirect
4347
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.22 // indirect
44-
github.com/aws/aws-sdk-go-v2/service/s3 v1.99.1 // indirect
4548
github.com/aws/aws-sdk-go-v2/service/signin v1.0.10 // indirect
4649
github.com/aws/aws-sdk-go-v2/service/sso v1.30.16 // indirect
4750
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.20 // indirect
4851
github.com/aws/aws-sdk-go-v2/service/sts v1.42.0 // indirect
49-
github.com/aws/smithy-go v1.25.0 // indirect
5052
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5153
github.com/dlclark/regexp2 v1.10.0 // indirect
5254
github.com/felixge/httpsnoop v1.0.4 // indirect
@@ -61,9 +63,7 @@ require (
6163
github.com/jackc/puddle/v2 v2.2.2 // indirect
6264
github.com/pkoukk/tiktoken-go v0.1.6 // indirect
6365
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
64-
github.com/riverqueue/river v0.35.0 // indirect
6566
github.com/riverqueue/river/riverdriver v0.35.0 // indirect
66-
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.35.0 // indirect
6767
github.com/riverqueue/river/rivershared v0.35.0 // indirect
6868
github.com/riverqueue/river/rivertype v0.35.0 // indirect
6969
github.com/rogpeppe/go-internal v1.14.1 // indirect

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gT
8080
github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA=
8181
github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q=
8282
github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA=
83+
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 h1:Dj0L5fhJ9F82ZJyVOmBx6msDp/kfd1t9GRfny/mfJA0=
84+
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds=
8385
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
8486
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
8587
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
@@ -109,6 +111,8 @@ github.com/riverqueue/river/rivershared v0.35.0 h1:8l0nemUfKvG51GhsjPAyhPVNw/Nej
109111
github.com/riverqueue/river/rivershared v0.35.0/go.mod h1:m6UB4lGgbwi8ikuKniISDJ/U+BvQYtNAtZwb90G85Wk=
110112
github.com/riverqueue/river/rivertype v0.35.0 h1:0SvJQB5GvSkGAyLLtUbtd9Fre7yuEpuzOtRNncvtj2Y=
111113
github.com/riverqueue/river/rivertype v0.35.0/go.mod h1:D1Ad+EaZiaXbQbJcJcfeicXJMBKno0n6UcfKI5Q7DIQ=
114+
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
115+
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
112116
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
113117
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
114118
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

0 commit comments

Comments
 (0)