Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
cli/.github/workflows/test.yml at develop · pascalarth-max/cli · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
pascalarth-max
cli
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
develop
Breadcrumbs
cli
/
.github
/
workflows
/
test.yml
Copy path
View runs
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
187 lines (167 loc) · 6.93 KB
develop
Breadcrumbs
cli
/
.github
/
workflows
/
test.yml
Copy path
Top
File metadata and controls
Code
Blame
187 lines (167 loc) · 6.93 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name
:
Test
#
Release-notes PRs (head ref `release-notes/*`) only add markdown under
#
`release-notes/` and are published via approval — skip the full CI suite.
on
:
pull_request
:
types
:
-
opened
-
synchronize
-
reopened
-
ready_for_review
branches
:
-
develop
merge_group
:
types
:
-
checks_requested
branches
:
-
develop
permissions
:
contents
:
read
actions
:
read
concurrency
:
group
:
${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress
:
true
jobs
:
check
:
if
:
|
!startsWith(github.head_ref, 'release-notes/') &&
(github.event_name == 'merge_group' ||
github.event.pull_request.draft == false)
name
:
Check code quality
runs-on
:
blacksmith-8vcpu-ubuntu-2404
steps
:
-
name
:
Checkout
uses
:
actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
#
v7.0.0
with
:
persist-credentials
:
false
-
name
:
Setup
uses
:
./.github/actions/setup
with
:
dependency-firewall-token
:
${{ secrets.DF_FIREWALL_TOKEN }}
-
name
:
Unlock keyring (for cli-go keyring tests)
uses
:
t1m0thyj/unlock-keyring@cbcf205c879ebd86add70bab3a6abfcce59a5cae
#
v1.2.0
-
name
:
Check code quality
run
:
pnpm run check:all
test-core
:
if
:
|
!startsWith(github.head_ref, 'release-notes/') &&
(github.event_name == 'merge_group' ||
github.event.pull_request.draft == false)
name
:
Run unit and integration tests
runs-on
:
blacksmith-8vcpu-ubuntu-2404
steps
:
-
name
:
Checkout
uses
:
actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
#
v7.0.0
with
:
persist-credentials
:
false
-
name
:
Setup
uses
:
./.github/actions/setup
with
:
dependency-firewall-token
:
${{ secrets.DF_FIREWALL_TOKEN }}
-
name
:
Unlock keyring (for cli-go keyring tests)
uses
:
t1m0thyj/unlock-keyring@cbcf205c879ebd86add70bab3a6abfcce59a5cae
#
v1.2.0
-
name
:
Run unit and integration tests
run
:
pnpm run test:core
test-e2e
:
if
:
|
!startsWith(github.head_ref, 'release-notes/') &&
(github.event_name == 'merge_group' ||
github.event.pull_request.draft == false)
name
:
Run end-to-end tests (shard ${{ matrix.shard }}/3)
runs-on
:
blacksmith-8vcpu-ubuntu-2404
strategy
:
fail-fast
:
false
matrix
:
shard
:
[ 1, 2, 3 ]
steps
:
-
name
:
Checkout
uses
:
useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121
#
v1.0.0-beta
with
:
fetch-depth
:
0
-
name
:
Set base and head SHAs for affected
if
:
github.event_name == 'pull_request'
uses
:
nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1
#
v5.0.1
-
name
:
Set base and head SHAs for merge queue affected
if
:
github.event_name == 'merge_group'
run
:
|
echo "NX_BASE=${{ github.event.merge_group.base_sha }}" >> "$GITHUB_ENV"
echo "NX_HEAD=${{ github.event.merge_group.head_sha }}" >> "$GITHUB_ENV"
-
name
:
Setup
uses
:
./.github/actions/setup
with
:
dependency-firewall-token
:
${{ secrets.DF_FIREWALL_TOKEN }}
#
Detect which e2e suites should run. On PR and merge queue runs we
#
honour `nx affected` using the event-specific base and head SHAs.
-
name
:
Detect affected e2e projects
id
:
detect
run
:
|
affected=$(pnpm exec nx show projects --affected --withTarget test:e2e --json | jq -r '.[]')
echo "Affected e2e projects:"
echo "$affected"
cli=false
other=false
if echo "$affected" | grep -qx '@supabase/cli-e2e'; then cli=true; fi
if echo "$affected" | grep -vx '@supabase/cli-e2e' | grep -q .; then other=true; fi
echo "cli_e2e=$cli" >> "$GITHUB_OUTPUT"
echo "other=$other" >> "$GITHUB_OUTPUT"
-
name
:
Cache Go CLI binary
if
:
steps.detect.outputs.cli_e2e == 'true'
id
:
cache-go-binary
uses
:
actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
#
v6.1.0
with
:
path
:
apps/cli-go/supabase-go
key
:
go-cli-${{ runner.os }}-${{ hashFiles('apps/cli-go/**/*.go',
'
apps/cli-go/go.mod
'
, 'apps/cli-go/go.sum') }}
-
name
:
Build Go CLI
if
:
steps.detect.outputs.cli_e2e == 'true' &&
steps.cache-go-binary.outputs.cache-hit != 'true'
run
:
go build -o supabase-go .
working-directory
:
apps/cli-go
#
The ts-legacy/ts-next harnesses invoke `node apps/cli/dist/supabase.js`
#
with `SUPABASE_CLI_BINARY_OVERRIDE` pointing at the compiled per-shell
#
binary in `apps/cli/dist/`. The `nx run @supabase/cli-e2e:test:e2e`
#
target normally builds the supabase umbrella via `dependsOn`, but we
#
bypass nx for sharding so we build it explicitly.
-
name
:
Build CLI
if
:
steps.detect.outputs.cli_e2e == 'true'
run
:
pnpm exec nx run supabase:build
#
Sharding for cli-e2e (the heavy suite) per
#
https://vitest.dev/guide/improving-performance.html#sharding. We invoke
#
vitest directly because routing `--shard` through `pnpm run / nx run-many
#
-- --shard=N/3` introduces a stray `--` that vitest treats as a
#
positional-argument terminator, defeating the shard flag. Other e2e
#
suites (process-compose) run unsharded on shard 1.
-
name
:
Run cli-e2e end-to-end tests
if
:
steps.detect.outputs.cli_e2e == 'true'
run
:
pnpm --filter @supabase/cli-e2e exec bun --bun vitest run --shard=${{
matrix.shard }}/3
env
:
CLI_HARNESS_TARGET
:
ts-legacy
SUPABASE_GO_BINARY
:
${{ github.workspace }}/apps/cli-go/supabase-go
-
name
:
Run other e2e tests (shard 1 only)
if
:
matrix.shard == 1 && steps.detect.outputs.other == 'true'
run
:
pnpm exec nx run-many -t test:e2e --exclude=@supabase/cli-e2e
env
:
SUPABASE_GO_BINARY
:
${{ github.workspace }}/apps/cli-go/supabase-go
#
Summary job that gates branch protection. The matrix `test-e2e` job
#
produces per-shard check names (`Run end-to-end tests (shard N/3)`), so
#
this job preserves the original `Run end-to-end tests` check name that
#
branch protection rules already require. It succeeds iff every shard
#
succeeded (or skipped — `success()` is true for skipped jobs).
test-e2e-summary
:
if
:
|
always() &&
!startsWith(github.head_ref, 'release-notes/') &&
(github.event_name == 'merge_group' ||
github.event.pull_request.draft == false)
name
:
Run end-to-end tests
needs
:
test-e2e
runs-on
:
ubuntu-latest
steps
:
-
name
:
Verify all shards succeeded
run
:
|
if [ "${{ needs.test-e2e.result }}" = "failure" ] || [ "${{ needs.test-e2e.result }}" = "cancelled" ]; then
echo "::error ::One or more e2e shards failed: ${{ needs.test-e2e.result }}"
exit 1
fi
echo "All e2e shards reported: ${{ needs.test-e2e.result }}"
You can’t perform that action at this time.