Skip to content

Commit 46d0ef8

Browse files
committed
chore: Initial project setup with CI/CD, testing framework, and Dependabot auto-merge
This commit message is: - Concise and clear - Focuses on the purpose (setting up the project infrastructure) - Follows the existing commit style (seen in the git log with "Initial commit") - Accurately describes this as a new setup rather than an update Signed-off-by: Svetlin Ralchev <iamralch@users.noreply.github.com>
1 parent a846c58 commit 46d0ef8

10 files changed

Lines changed: 3172 additions & 0 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for Go modules
4+
- package-ecosystem: "gomod"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 10
9+
labels:
10+
- "dependencies"
11+
- "go"
12+
commit-message:
13+
prefix: "chore"
14+
include: "scope"
15+
16+
# Maintain dependencies for GitHub Actions
17+
- package-ecosystem: "github-actions"
18+
directory: "/"
19+
schedule:
20+
interval: "weekly"
21+
open-pull-requests-limit: 10
22+
labels:
23+
- "dependencies"
24+
- "github-actions"
25+
commit-message:
26+
prefix: "chore"
27+
include: "scope"

‎.github/workflows/ci.yml‎

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
checks: write
13+
jobs:
14+
test:
15+
name: Test
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: go.mod
24+
cache: true
25+
- name: Download dependencies
26+
run: go mod download
27+
- name: Run tests with coverage
28+
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
29+
- name: Upload coverage to artifacts
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: coverage
33+
path: coverage.out
34+
coverage:
35+
name: Code Coverage
36+
runs-on: ubuntu-latest
37+
needs: test
38+
if: github.event_name == 'pull_request'
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
- name: Download coverage
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: coverage
48+
- name: Run octocov
49+
uses: k1LoW/octocov-action@v1
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
lint:
53+
name: Lint
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v4
58+
- name: Set up Go
59+
uses: actions/setup-go@v5
60+
with:
61+
go-version-file: go.mod
62+
cache: true
63+
- name: Run golangci-lint
64+
uses: golangci/golangci-lint-action@v6
65+
with:
66+
version: latest
67+
release-please:
68+
name: Release Please
69+
runs-on: ubuntu-latest
70+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
71+
needs: [test, lint]
72+
steps:
73+
- name: Run release-please
74+
uses: googleapis/release-please-action@v4
75+
with:
76+
release-type: go
77+
token: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/pr.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: PR
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
auto-merge:
11+
name: Auto-merge Dependabot PRs
12+
runs-on: ubuntu-latest
13+
if: github.actor == 'dependabot[bot]'
14+
steps:
15+
- name: Dependabot metadata
16+
id: metadata
17+
uses: dependabot/fetch-metadata@v2
18+
with:
19+
github-token: "${{ secrets.GITHUB_TOKEN }}"
20+
- name: Enable auto-merge for Dependabot PRs
21+
run: gh pr merge --auto --squash "$PR_URL"
22+
env:
23+
PR_URL: ${{ github.event.pull_request.html_url }}
24+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.octocov.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
coverage:
2+
paths:
3+
- coverage.out
4+
badge:
5+
path: .github/coverage.svg
6+
comment:
7+
if: is_pull_request
8+
hideFooterLink: false
9+
diff:
10+
datastores:
11+
- artifact://.octocov
12+
codeToTestRatio:
13+
code:
14+
- "**/*.go"
15+
- "!**/*_test.go"
16+
test:
17+
- "**/*_test.go"

‎cmd/sqlc-gen-queries/main.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package main
2+
3+
func main() {
4+
}

‎go.mod‎

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
module github.com/sqlc-contrib/sqlc-gen-queries
2+
3+
go 1.24.10
4+
5+
tool (
6+
github.com/k1LoW/octocov
7+
github.com/onsi/ginkgo/v2/ginkgo
8+
)
9+
10+
require (
11+
github.com/onsi/ginkgo/v2 v2.27.2
12+
github.com/onsi/gomega v1.38.2
13+
)
14+
15+
require (
16+
cel.dev/expr v0.24.0 // indirect
17+
cloud.google.com/go v0.121.6 // indirect
18+
cloud.google.com/go/auth v0.17.0 // indirect
19+
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
20+
cloud.google.com/go/bigquery v1.72.0 // indirect
21+
cloud.google.com/go/compute/metadata v0.9.0 // indirect
22+
cloud.google.com/go/iam v1.5.2 // indirect
23+
cloud.google.com/go/monitoring v1.24.2 // indirect
24+
cloud.google.com/go/storage v1.57.2 // indirect
25+
connectrpc.com/connect v1.18.1 // indirect
26+
dario.cat/mergo v1.0.1 // indirect
27+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 // indirect
28+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
29+
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0 // indirect
30+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 // indirect
31+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect
32+
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect
33+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
34+
github.com/Microsoft/go-winio v0.6.2 // indirect
35+
github.com/ProtonMail/go-crypto v1.1.6 // indirect
36+
github.com/antchfx/xmlquery v1.5.0 // indirect
37+
github.com/antchfx/xpath v1.3.5 // indirect
38+
github.com/apache/arrow/go/v15 v15.0.2 // indirect
39+
github.com/aws/aws-sdk-go-v2 v1.40.0 // indirect
40+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 // indirect
41+
github.com/aws/aws-sdk-go-v2/config v1.32.0 // indirect
42+
github.com/aws/aws-sdk-go-v2/credentials v1.19.0 // indirect
43+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 // indirect
44+
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.10 // indirect
45+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 // indirect
46+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 // indirect
47+
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
48+
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14 // indirect
49+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect
50+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5 // indirect
51+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 // indirect
52+
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14 // indirect
53+
github.com/aws/aws-sdk-go-v2/service/s3 v1.92.0 // indirect
54+
github.com/aws/aws-sdk-go-v2/service/signin v1.0.1 // indirect
55+
github.com/aws/aws-sdk-go-v2/service/sso v1.30.4 // indirect
56+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.8 // indirect
57+
github.com/aws/aws-sdk-go-v2/service/sts v1.41.1 // indirect
58+
github.com/aws/smithy-go v1.23.2 // indirect
59+
github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect
60+
github.com/bradleyfalzon/ghinstallation/v2 v2.17.0 // indirect
61+
github.com/buildkite/interpolate v0.1.5 // indirect
62+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
63+
github.com/chainguard-dev/git-urls v1.0.2 // indirect
64+
github.com/cli/go-gh/v2 v2.12.2 // indirect
65+
github.com/cli/safeexec v1.0.1 // indirect
66+
github.com/cloudflare/circl v1.6.1 // indirect
67+
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect
68+
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
69+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
70+
github.com/emirpasic/gods v1.18.1 // indirect
71+
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
72+
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
73+
github.com/expr-lang/expr v1.17.6 // indirect
74+
github.com/fatih/color v1.18.0 // indirect
75+
github.com/felixge/httpsnoop v1.0.4 // indirect
76+
github.com/go-enry/go-enry/v2 v2.9.2 // indirect
77+
github.com/go-enry/go-oniguruma v1.2.1 // indirect
78+
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
79+
github.com/go-git/go-billy/v5 v5.6.2 // indirect
80+
github.com/go-git/go-git/v5 v5.16.3 // indirect
81+
github.com/go-jose/go-jose/v4 v4.1.2 // indirect
82+
github.com/go-logr/logr v1.4.3 // indirect
83+
github.com/go-logr/stdr v1.2.2 // indirect
84+
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
85+
github.com/goark/errs v1.3.2 // indirect
86+
github.com/goark/gnkf v0.7.9 // indirect
87+
github.com/goccy/go-json v0.10.5 // indirect
88+
github.com/goccy/go-yaml v1.18.0 // indirect
89+
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
90+
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
91+
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
92+
github.com/google/flatbuffers v24.3.25+incompatible // indirect
93+
github.com/google/go-cmp v0.7.0 // indirect
94+
github.com/google/go-github/v67 v67.0.0 // indirect
95+
github.com/google/go-github/v75 v75.0.0 // indirect
96+
github.com/google/go-querystring v1.1.0 // indirect
97+
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
98+
github.com/google/s2a-go v0.1.9 // indirect
99+
github.com/google/uuid v1.6.0 // indirect
100+
github.com/googleapis/enterprise-certificate-proxy v0.3.7 // indirect
101+
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
102+
github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c // indirect
103+
github.com/hhatto/gocloc v0.7.0 // indirect
104+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
105+
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
106+
github.com/jszwec/s3fs/v2 v2.0.0 // indirect
107+
github.com/k1LoW/duration v1.2.0 // indirect
108+
github.com/k1LoW/errors v1.1.0 // indirect
109+
github.com/k1LoW/expand v0.16.3 // indirect
110+
github.com/k1LoW/ghfs v1.5.3 // indirect
111+
github.com/k1LoW/go-github-actions v0.2.0 // indirect
112+
github.com/k1LoW/go-github-client/v67 v67.0.21 // indirect
113+
github.com/k1LoW/octocov v0.73.1 // indirect
114+
github.com/k1LoW/repin v0.4.0 // indirect
115+
github.com/kevinburke/ssh_config v1.2.0 // indirect
116+
github.com/klauspost/compress v1.17.11 // indirect
117+
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
118+
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
119+
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
120+
github.com/lestrrat-go/httpcc v1.0.1 // indirect
121+
github.com/lestrrat-go/httprc v1.0.6 // indirect
122+
github.com/lestrrat-go/iter v1.0.2 // indirect
123+
github.com/lestrrat-go/jwx/v2 v2.1.4 // indirect
124+
github.com/lestrrat-go/option v1.0.1 // indirect
125+
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
126+
github.com/mackerelio/mackerel-client-go v0.37.3 // indirect
127+
github.com/mattn/go-colorable v0.1.13 // indirect
128+
github.com/mattn/go-isatty v0.0.20 // indirect
129+
github.com/mattn/go-runewidth v0.0.16 // indirect
130+
github.com/mauri870/gcsfs v0.0.0-20240120035028-2326f4c97769 // indirect
131+
github.com/oklog/ulid/v2 v2.1.1 // indirect
132+
github.com/olekukonko/tablewriter v0.0.5 // indirect
133+
github.com/pierrec/lz4/v4 v4.1.22 // indirect
134+
github.com/pjbgf/sha1cd v0.3.2 // indirect
135+
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
136+
github.com/rivo/uniseg v0.4.7 // indirect
137+
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect
138+
github.com/samber/lo v1.52.0 // indirect
139+
github.com/segmentio/asm v1.2.0 // indirect
140+
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
141+
github.com/shurcooL/githubv4 v0.0.0-20240120211514-18a1ae0e79dc // indirect
142+
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect
143+
github.com/skeema/knownhosts v1.3.1 // indirect
144+
github.com/spf13/cobra v1.10.1 // indirect
145+
github.com/spf13/pflag v1.0.10 // indirect
146+
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
147+
github.com/xanzy/ssh-agent v0.3.3 // indirect
148+
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
149+
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
150+
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
151+
github.com/zeebo/errs v1.4.0 // indirect
152+
github.com/zeebo/xxh3 v1.0.2 // indirect
153+
github.com/zhangyunhao116/fastrand v0.3.0 // indirect
154+
github.com/zhangyunhao116/skipmap v0.10.1 // indirect
155+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
156+
go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect
157+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
158+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
159+
go.opentelemetry.io/otel v1.37.0 // indirect
160+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
161+
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
162+
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
163+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
164+
go.yaml.in/yaml/v3 v3.0.4 // indirect
165+
golang.org/x/crypto v0.45.0 // indirect
166+
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
167+
golang.org/x/image v0.33.0 // indirect
168+
golang.org/x/mod v0.30.0 // indirect
169+
golang.org/x/net v0.47.0 // indirect
170+
golang.org/x/oauth2 v0.33.0 // indirect
171+
golang.org/x/sync v0.18.0 // indirect
172+
golang.org/x/sys v0.38.0 // indirect
173+
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
174+
golang.org/x/text v0.31.0 // indirect
175+
golang.org/x/time v0.14.0 // indirect
176+
golang.org/x/tools v0.39.0 // indirect
177+
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
178+
google.golang.org/api v0.256.0 // indirect
179+
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
180+
google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect
181+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 // indirect
182+
google.golang.org/grpc v1.76.0 // indirect
183+
google.golang.org/protobuf v1.36.10 // indirect
184+
gopkg.in/ini.v1 v1.67.0 // indirect
185+
gopkg.in/warnings.v0 v0.1.2 // indirect
186+
gopkg.in/yaml.v3 v3.0.1 // indirect
187+
)

0 commit comments

Comments
 (0)