Skip to content

Commit f95d77b

Browse files
committed
docs: Add comprehensive guide for auto-compilation flow development and deployment strategies
1 parent 1e1477f commit f95d77b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3724
-485
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'pgflow': minor
3+
'@pgflow/edge-worker': minor
4+
---
5+
6+
Add auto-compilation flow and HTTP control plane server for edge worker

.github/workflows/ci.yml

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: echo "BASE=$NX_BASE HEAD=$NX_HEAD"
5454

5555
- name: Pre-start Supabase for affected packages
56-
run: ./scripts/ci-prestart-supabase.sh core client
56+
run: ./scripts/ci-prestart-supabase.sh core client cli
5757

5858
- name: Quality gate (lint + typecheck + test)
5959
run: pnpm nx affected -t lint typecheck test --parallel --configuration=production --base="$NX_BASE" --head="$NX_HEAD"
@@ -117,9 +117,62 @@ jobs:
117117
if: steps.check-affected.outputs.affected == 'true'
118118
run: pnpm nx affected -t test:e2e --parallel --base="$NX_BASE" --head="$NX_HEAD"
119119

120+
# ─────────────────────────────────────── 2b. CLI E2E ──────────────────────────────────────
121+
cli-e2e:
122+
runs-on: ubuntu-latest
123+
env:
124+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
125+
steps:
126+
- uses: actions/checkout@v4
127+
with:
128+
fetch-depth: 0
129+
130+
- uses: ./.github/actions/setup
131+
132+
- name: Setup Deno
133+
uses: denoland/setup-deno@v2
134+
with:
135+
deno-version: '2.1.4'
136+
137+
- name: Install sqruff
138+
uses: ./.github/actions/setup-sqruff
139+
with:
140+
github-token: ${{ secrets.GITHUB_TOKEN }}
141+
142+
- name: Setup Atlas
143+
uses: ariga/setup-atlas@master
144+
with:
145+
cloud-token: ${{ secrets.ATLAS_CLOUD_TOKEN }}
146+
147+
- name: Set Nx base for affected commands
148+
run: |
149+
echo "NX_BASE=origin/main" >> $GITHUB_ENV
150+
echo "NX_HEAD=HEAD" >> $GITHUB_ENV
151+
152+
- name: Verify NX_BASE and NX_HEAD are set
153+
run: echo "BASE=$NX_BASE HEAD=$NX_HEAD"
154+
155+
- name: Pre-start Supabase for CLI
156+
run: ./scripts/ci-prestart-supabase.sh cli
157+
158+
- name: Check if CLI e2e tests are affected
159+
id: check-affected
160+
run: |
161+
if pnpm nx show projects --affected -t test:e2e --base="$NX_BASE" --head="$NX_HEAD" | grep -q "^cli$"; then
162+
echo "affected=true" >> $GITHUB_OUTPUT
163+
echo "CLI e2e tests are affected by changes"
164+
else
165+
echo "affected=false" >> $GITHUB_OUTPUT
166+
echo "CLI e2e tests are not affected by changes - skipping"
167+
fi
168+
169+
- name: Run CLI e2e tests
170+
if: steps.check-affected.outputs.affected == 'true'
171+
run: pnpm nx test:e2e cli
172+
120173
# ────────────────────────────────── 3. DEPLOY WEBSITE ───────────────────────────
121174
deploy-website:
122-
needs: [build-and-test, edge-worker-e2e]
175+
needs: [build-and-test, edge-worker-e2e, cli-e2e]
123176
runs-on: ubuntu-latest
124177
environment: ${{ github.event_name == 'pull_request' && 'preview' || 'production' }}
125178
env:
@@ -203,7 +256,7 @@ jobs:
203256
# ────────────────────────────────── 4. DEPLOY DEMO ───────────────────────────
204257
deploy-demo:
205258
if: false # temporarily disabled
206-
needs: [build-and-test, edge-worker-e2e]
259+
needs: [build-and-test, edge-worker-e2e, cli-e2e]
207260
runs-on: ubuntu-latest
208261
environment: ${{ github.event_name == 'pull_request' && 'preview' || 'production' }}
209262
env:

0 commit comments

Comments
 (0)