Skip to content

Commit f7d28a9

Browse files
committed
chore(monorepo): post-merge fixups (paths, workflows, nx-go, readmes, docs, lockfile)
1 parent 404a419 commit f7d28a9

37 files changed

Lines changed: 660 additions & 1677 deletions
Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ name: CI
22

33
on:
44
pull_request:
5+
paths:
6+
- apps/cli-go/**
57
merge_group:
8+
paths:
9+
- apps/cli-go/**
610
push:
711
branches:
812
- develop
13+
paths:
14+
- apps/cli-go/**
915

1016
permissions:
1117
contents: read
@@ -19,7 +25,7 @@ jobs:
1925

2026
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2127
with:
22-
go-version-file: go.mod
28+
go-version-file: apps/cli-go/go.mod
2329
cache: true
2430

2531
# Required by: internal/utils/credentials/keyring_test.go
@@ -37,7 +43,7 @@ jobs:
3743

3844
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3945
with:
40-
go-version-file: go.mod
46+
go-version-file: apps/cli-go/go.mod
4147
# Linter requires no cache
4248
cache: false
4349

@@ -54,7 +60,7 @@ jobs:
5460
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5561
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
5662
with:
57-
go-version-file: go.mod
63+
go-version-file: apps/cli-go/go.mod
5864
cache: true
5965
- run: go build main.go
6066
- run: ./main init
@@ -71,13 +77,14 @@ jobs:
7177

7278
link:
7379
name: Link
74-
if: ${{ github.event_name == 'merge_group' || (github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork) }}
80+
if: ${{ github.event_name == 'merge_group' || (github.event_name ==
81+
'pull_request' && !github.event.pull_request.head.repo.fork) }}
7582
runs-on: ubuntu-latest
7683
steps:
7784
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7885
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
7986
with:
80-
go-version-file: go.mod
87+
go-version-file: apps/cli-go/go.mod
8188
cache: true
8289
- run: go build main.go
8390
- run: ./main link
@@ -93,7 +100,7 @@ jobs:
93100

94101
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
95102
with:
96-
go-version-file: go.mod
103+
go-version-file: apps/cli-go/go.mod
97104
cache: true
98105

99106
- run: go generate
@@ -103,3 +110,6 @@ jobs:
103110
git diff
104111
exit 1
105112
fi
113+
defaults:
114+
run:
115+
working-directory: apps/cli-go

apps/cli-go/.github/workflows/codeql-analysis.yml renamed to .github/workflows/cli-go-codeql.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ name: "CodeQL"
1313

1414
on:
1515
pull_request:
16+
paths:
17+
- apps/cli-go/**
1618
merge_group:
19+
paths:
20+
- apps/cli-go/**
1721
push:
1822
branches:
1923
- develop
24+
paths:
25+
- apps/cli-go/**
2026

2127
jobs:
2228
analyze:
@@ -72,12 +78,12 @@ jobs:
7278
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
7379
# queries: security-extended,security-and-quality
7480

75-
# If the analyze step fails for one of the languages you are analyzing with
76-
# "We were unable to automatically build your code", modify the matrix above
77-
# to set the build mode to "manual" for that language. Then modify this step
78-
# to build your code.
79-
# ℹ️ Command-line programs to run using the OS shell.
80-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
81+
# If the analyze step fails for one of the languages you are analyzing with
82+
# "We were unable to automatically build your code", modify the matrix above
83+
# to set the build mode to "manual" for that language. Then modify this step
84+
# to build your code.
85+
# ℹ️ Command-line programs to run using the OS shell.
86+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
8187
- if: matrix.build-mode == 'manual'
8288
shell: bash
8389
run: |
@@ -92,3 +98,6 @@ jobs:
9298
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
9399
with:
94100
category: "/language:${{matrix.language}}"
101+
defaults:
102+
run:
103+
working-directory: apps/cli-go

.github/workflows/test.yml

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: Test
33
on:
44
push:
55
branches:
6-
- main
6+
- develop
77
pull_request:
88
types:
99
- opened
1010
- synchronize
1111
- reopened
1212
- ready_for_review
1313
branches:
14-
- main
14+
- develop
1515

1616
permissions:
1717
contents: read
@@ -32,30 +32,20 @@ jobs:
3232

3333
- name: Setup
3434
uses: ./.github/actions/setup
35+
- name: Setup Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version-file: apps/cli-go/go.mod
39+
cache-dependency-path: apps/cli-go/go.sum
40+
- name: Install golangci-lint
41+
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest &&
42+
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
43+
- name: Unlock keyring (for cli-go keyring tests)
44+
uses: t1m0thyj/unlock-keyring@cbcf205c879ebd86add70bab3a6abfcce59a5cae
3545

3646
- name: Check code quality
3747
run: pnpm run check:all
3848

39-
fixture-guard:
40-
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
41-
name: Cap cli-e2e fixture additions per PR
42-
runs-on: ubuntu-latest
43-
steps:
44-
- name: Checkout
45-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
46-
with:
47-
fetch-depth: 0
48-
49-
- name: Cap fixture additions
50-
run: |
51-
base="origin/${{ github.event.pull_request.base.ref }}"
52-
added=$(git diff --name-only --diff-filter=A "$base"...HEAD apps/cli-e2e/fixtures/ | wc -l | tr -d ' ')
53-
echo "PR adds $added files under apps/cli-e2e/fixtures/"
54-
if [ "$added" -gt 250 ]; then
55-
echo "::error ::PR adds $added fixture files (>250). The recorder probably captured polling traffic or per-container interactions — re-record with a clean recorded/ directory and verify the count drops below the cap."
56-
exit 1
57-
fi
58-
5949
test-core:
6050
if: github.event.pull_request.draft == false || github.event_name == 'push'
6151
name: Run unit and integration tests
@@ -66,6 +56,16 @@ jobs:
6656

6757
- name: Setup
6858
uses: ./.github/actions/setup
59+
- name: Setup Go
60+
uses: actions/setup-go@v5
61+
with:
62+
go-version-file: apps/cli-go/go.mod
63+
cache-dependency-path: apps/cli-go/go.sum
64+
- name: Install golangci-lint
65+
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest &&
66+
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
67+
- name: Unlock keyring (for cli-go keyring tests)
68+
uses: t1m0thyj/unlock-keyring@cbcf205c879ebd86add70bab3a6abfcce59a5cae
6969

7070
- name: Run unit and integration tests
7171
run: pnpm run test:core
@@ -77,7 +77,7 @@ jobs:
7777
strategy:
7878
fail-fast: false
7979
matrix:
80-
shard: [1, 2, 3]
80+
shard: [ 1, 2, 3 ]
8181
steps:
8282
- name: Checkout
8383
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -111,29 +111,28 @@ jobs:
111111
echo "cli_e2e=$cli" >> "$GITHUB_OUTPUT"
112112
echo "other=$other" >> "$GITHUB_OUTPUT"
113113
114-
- name: Initialize Go CLI submodule
115-
if: steps.detect.outputs.cli_e2e == 'true'
116-
run: git submodule update --init .repos/supabase-cli-go
117-
118114
- name: Cache Go CLI binary
119115
if: steps.detect.outputs.cli_e2e == 'true'
120116
id: cache-go-binary
121117
uses: actions/cache@v4
122118
with:
123-
path: .repos/supabase-cli-go/supabase-go
124-
key: go-cli-${{ runner.os }}-${{ hashFiles('.repos/supabase-cli-go/**/*.go', '.repos/supabase-cli-go/go.mod', '.repos/supabase-cli-go/go.sum') }}
119+
path: apps/cli-go/supabase-go
120+
key: go-cli-${{ runner.os }}-${{ hashFiles('apps/cli-go/**/*.go',
121+
'apps/cli-go/go.mod', 'apps/cli-go/go.sum') }}
125122

126123
- name: Setup Go
127-
if: steps.detect.outputs.cli_e2e == 'true' && steps.cache-go-binary.outputs.cache-hit != 'true'
124+
if: steps.detect.outputs.cli_e2e == 'true' &&
125+
steps.cache-go-binary.outputs.cache-hit != 'true'
128126
uses: actions/setup-go@v5
129127
with:
130-
go-version-file: .repos/supabase-cli-go/go.mod
131-
cache-dependency-path: .repos/supabase-cli-go/go.sum
128+
go-version-file: apps/cli-go/go.mod
129+
cache-dependency-path: apps/cli-go/go.sum
132130

133131
- name: Build Go CLI
134-
if: steps.detect.outputs.cli_e2e == 'true' && steps.cache-go-binary.outputs.cache-hit != 'true'
132+
if: steps.detect.outputs.cli_e2e == 'true' &&
133+
steps.cache-go-binary.outputs.cache-hit != 'true'
135134
run: go build -o supabase-go .
136-
working-directory: .repos/supabase-cli-go
135+
working-directory: apps/cli-go
137136

138137
# The ts-legacy harness invokes `bun apps/cli/dist/main-legacy.js`; the
139138
# `nx run @supabase/cli-e2e:test:e2e` target normally builds @supabase/cli
@@ -150,24 +149,26 @@ jobs:
150149
# suites (process-compose) run unsharded on shard 1.
151150
- name: Run cli-e2e end-to-end tests
152151
if: steps.detect.outputs.cli_e2e == 'true'
153-
run: pnpm --filter @supabase/cli-e2e exec bun --bun vitest run --shard=${{ matrix.shard }}/3
152+
run: pnpm --filter @supabase/cli-e2e exec bun --bun vitest run --shard=${{
153+
matrix.shard }}/3
154154
env:
155155
CLI_HARNESS_TARGET: ts-legacy
156-
SUPABASE_GO_BINARY: ${{ github.workspace }}/.repos/supabase-cli-go/supabase-go
156+
SUPABASE_GO_BINARY: ${{ github.workspace }}/apps/cli-go/supabase-go
157157

158158
- name: Run other e2e tests (shard 1 only)
159159
if: matrix.shard == 1 && steps.detect.outputs.other == 'true'
160160
run: pnpm exec nx run-many -t test:e2e --exclude=@supabase/cli-e2e
161161
env:
162-
SUPABASE_GO_BINARY: ${{ github.workspace }}/.repos/supabase-cli-go/supabase-go
162+
SUPABASE_GO_BINARY: ${{ github.workspace }}/apps/cli-go/supabase-go
163163

164164
# Summary job that gates branch protection. The matrix `test-e2e` job
165165
# produces per-shard check names (`Run end-to-end tests (shard N/3)`), so
166166
# this job preserves the original `Run end-to-end tests` check name that
167167
# branch protection rules already require. It succeeds iff every shard
168168
# succeeded (or skipped — `success()` is true for skipped jobs).
169169
test-e2e-summary:
170-
if: always() && (github.event.pull_request.draft == false || github.event_name == 'push')
170+
if: always() && (github.event.pull_request.draft == false || github.event_name
171+
== 'push')
171172
name: Run end-to-end tests
172173
needs: test-e2e
173174
runs-on: ubuntu-latest

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
[submodule ".repos/process-compose"]
1717
path = .repos/process-compose
1818
url = https://github.com/F1bonacc1/process-compose.git
19-
[submodule ".repos/supabase-cli-go"]
20-
path = .repos/supabase-cli-go
21-
url = https://github.com/supabase/cli.git
2219
[submodule ".repos/t3code"]
2320
path = .repos/t3code
2421
url = https://github.com/pingdotgg/t3code.git

.repos/supabase-cli-go

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)