mirror of
https://github.com/supabase/setup-cli.git
synced 2026-08-12 08:45:15 +00:00
## Summary - install the Supabase CLI through the `supabase` npm package instead of GitHub release archives - support npm-backed `latest`, `beta`, and fixed published versions, with root lockfile detection preserved - remove the `github-token` input and use Node.js/npm without clobbering an already configured Node.js 20+ runtime - update CI/docs for the v3 action contract and remove stale license cache entries for removed dependencies Addresses CLI-1480: https://linear.app/supabase/issue/CLI-1480/source-cli-install-from-npm-registry No earlier pull request found to supersede. ## Validation - `bun run ci` - real npm install spot checks for `supabase@latest`, `supabase@beta`, `supabase@1.178.2`, `supabase@2.33.0`, and legacy `supabase@1.15.1` preinstall handling - external fixture run: https://github.com/jgoux/setup-cli-testing/actions/runs/28656824691 - hosted runners: Ubuntu, macOS, and Windows for `latest`, `beta`, `1.178.2`, and `2.33.0` - package-lock detection: resolved and installed `supabase@2.108.0` - legacy preinstall: installed `supabase@1.15.1` - Node preservation: kept a caller-provided Node.js 22 runtime active after the action - Alpine 3.20 container: `latest`, `beta`, and `2.100.0`, including Node.js 20+ and runtime dependency checks - Alpine 3.18 container: rejected Node.js 18 with a clear setup error
74 lines
1.7 KiB
YAML
74 lines
1.7 KiB
YAML
name: E2E
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- ready_for_review
|
|
- converted_to_draft
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
schedule:
|
|
# * is a special character in YAML so you have to quote this string
|
|
- cron: "30 1,9 * * *"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
e2e: # make sure the action works on a clean machine without building
|
|
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version:
|
|
- 1.178.2
|
|
- 2.33.0
|
|
- latest
|
|
pg_major:
|
|
- 14
|
|
- 15
|
|
- 17
|
|
exclude:
|
|
- version: 1.178.2
|
|
pg_major: 17
|
|
- version: latest
|
|
pg_major: 14
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./
|
|
with:
|
|
version: ${{ matrix.version }}
|
|
- run: supabase init
|
|
- run: |
|
|
sed -i -E "s|^(major_version) .*|\\1 = ${{ matrix.pg_major }}|" supabase/config.toml
|
|
- run: supabase start
|
|
|
|
e2e-check:
|
|
if: ${{ always() && github.event_name == 'pull_request' }}
|
|
name: E2E
|
|
runs-on: ubuntu-latest
|
|
needs: [e2e]
|
|
timeout-minutes: 5
|
|
steps:
|
|
- run: |
|
|
e2e_result="${{ needs.e2e.result }}"
|
|
[[ "$e2e_result" == "success" || "$e2e_result" == "skipped" ]]
|