feat: bump auth-js to 2.71.1 (#1507) #1383
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '**/*.md' | |
- '.prettierrc' | |
- '**/*ignore' | |
push: | |
branches: | |
- master | |
- next | |
- rc | |
paths-ignore: | |
- 'docs/**' | |
- '**/*.md' | |
- '.prettierrc' | |
- '**/*ignore' | |
workflow_call: | |
env: | |
NODE_VERSION: '20' | |
jobs: | |
build-package: | |
name: Build supabase-js package | |
runs-on: ubuntu-latest | |
outputs: | |
tgz-name: ${{ steps.pack.outputs.filename }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install dependencies and build | |
run: | | |
npm ci | |
npm run build | |
npm run build:umd | |
- name: Pack npm module | |
id: pack | |
run: | | |
PKG=$(npm pack) | |
echo "filename=$PKG" >> "$GITHUB_OUTPUT" | |
- name: Upload .tgz package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: supabase-tgz | |
path: ${{ steps.pack.outputs.filename }} | |
- name: Upload UMD build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: supabase-umd | |
path: dist/umd/supabase.js | |
test: | |
name: Unit + Type Check / Node.js ${{ matrix.node }} / OS ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: [20] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Type Check | |
run: npm run test:types | |
- name: Run Unit Tests + Coverage | |
run: npm run test:coverage | |
- name: Upload coverage results to Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./test/coverage/lcov.info | |
deno-tests: | |
name: Deno Tests / ${{ matrix.deno }} | |
runs-on: ubuntu-latest | |
needs: build-package | |
strategy: | |
matrix: | |
deno: ['1.x', '2.x'] | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: ${{ matrix.deno }} | |
- name: Setup Supabase CLI | |
uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'npm' | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: supabase-tgz | |
path: ./supabase-pkg | |
- name: Start Supabase | |
run: supabase start | |
- name: Install dependencies and build | |
run: | | |
npm ci | |
npm run build | |
- name: Run Deno Tests | |
run: | | |
cd test/deno | |
cp ../../supabase-pkg/supabase-supabase-js-0.0.0-automated.tgz . | |
npm install | |
npm test || npm test | |
- name: Run integration and browser tests on Deno 2.x only | |
if: ${{ matrix.deno == '2.x' }} | |
run: npm run test:integration:browser | |
- name: Stop Supabase | |
if: always() | |
run: supabase stop | |
node-integration: | |
name: Node Integration | |
runs-on: ubuntu-latest | |
needs: build-package | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'npm' | |
- name: Setup Supabase CLI | |
uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Start Supabase | |
run: supabase start | |
- name: Install dependencies and build | |
run: | | |
npm ci | |
npm run build | |
- name: Run integration tests | |
run: npm run test:integration || npm run test:integration | |
- name: Stop Supabase | |
if: always() | |
run: supabase stop | |
next-integration: | |
name: Next.js Integration | |
runs-on: ubuntu-latest | |
needs: build-package | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'npm' | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: supabase-tgz | |
path: ./supabase-pkg | |
- name: Setup Supabase CLI | |
uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Start Supabase | |
run: supabase start | |
- name: Install Playwright browsers and dependencies | |
run: npx playwright install --with-deps | |
- name: Run integration tests | |
run: | | |
cd test/integration/next | |
cp ../../../supabase-pkg/supabase-supabase-js-0.0.0-automated.tgz . | |
npm install --legacy-peer-deps | |
npx playwright install | |
npm run test | |
- name: Stop Supabase | |
if: always() | |
run: supabase stop | |
expo-tests: | |
name: Expo Tests | |
runs-on: ubuntu-latest | |
needs: build-package | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'npm' | |
- name: Setup Supabase CLI | |
uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: supabase-tgz | |
path: ./supabase-pkg | |
- name: Start Supabase | |
run: supabase start | |
- name: Install dependencies and run tests | |
run: | | |
cd test/integration/expo | |
cp ../../../supabase-pkg/supabase-supabase-js-0.0.0-automated.tgz . | |
npm install | |
npm test || npm test | |
- name: Stop Supabase | |
if: always() | |
run: supabase stop | |
bun-integration: | |
name: Bun Integration | |
runs-on: ubuntu-latest | |
needs: build-package | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Setup Supabase CLI | |
uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: supabase-tgz | |
path: ./supabase-pkg | |
- name: Start Supabase | |
run: supabase start | |
- name: Install dependencies and run tests | |
run: | | |
cd test/integration/bun | |
cp ../../../supabase-pkg/supabase-supabase-js-0.0.0-automated.tgz . | |
bun install | |
bun test | |
- name: Stop Supabase | |
if: always() | |
run: supabase stop | |
websocket-browser-tests: | |
name: WebSocket Browser Tests | |
runs-on: ubuntu-latest | |
needs: build-package | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: supabase-umd | |
path: ./dist/umd | |
- name: Setup Supabase CLI | |
uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Install Playwright browsers and dependencies | |
run: npx playwright install --with-deps | |
- name: Start Supabase | |
run: supabase start | |
- name: Run WebSocket tests | |
run: | | |
cd test/integration/node-browser | |
npm install | |
cp ../../../dist/umd/supabase.js . | |
npm run test | |
- name: Stop Supabase | |
if: always() | |
run: supabase stop |