Skip to content

test: add integration tests for next js #1277

test: add integration tests for next js

test: add integration tests for next js #1277

Workflow file for this run

name: CI
on:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
- '.prettierrc'
- '**/*ignore'
push:
branches:
- master
- next
- rc
paths-ignore:
- 'docs/**'
- '**/*.md'
- '.prettierrc'
- '**/*ignore'
jobs:
test:
name: Unit + Type Check / Node.js ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: [20]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm clean-install
- 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@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
deno-tests:
name: Deno Tests / ${{ matrix.deno }}
runs-on: ubuntu-latest
strategy:
matrix:
deno: ['1.x', '2.x']
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: ${{ matrix.deno }}
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Start Supabase
run: supabase start
- name: Run Deno Tests
run: |
npm clean-install
npm run build
cd test/deno
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 || npm run test:integration
npm run test:integration:browser
- name: Stop Supabase
run: supabase stop
node-integration:
name: Node Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Start Supabase
run: supabase start
- name: Run integration tests
run: |
npm clean-install
npm run build
npm run test:integration || npm run test:integration
- name: Stop Supabase
run: supabase stop
next-integration:
name: Next.js Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- 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
npm install
npx playwright install
npm run test
- name: Stop Supabase
run: supabase stop