test: add Expo compatibility CI job #1247
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' | |
jobs: | |
test: | |
name: Test / OS ${{ matrix.os }} / Node ${{ matrix.node }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: ['20'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Run tests | |
run: | | |
npm clean-install | |
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 | |
integration: | |
name: Integration / OS ${{ matrix.os }} / Node ${{ matrix.node }} / Deno ${{ matrix.deno }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: ['20'] | |
deno: ['2.x'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: ${{ matrix.deno }} | |
- name: Setup Supabase | |
uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
- name: Start Supabase | |
run: | | |
supabase start | |
- name: Prepare integration tests | |
run: | | |
npm clean-install | |
npm run build | |
npm pack | |
- name: Run integration tests | |
run: | | |
npm run test:integration || npm run test:integration | |
- name: Run browser integration tests | |
run: | | |
npm run test:integration:browser | |
- name: Run expo compatibility tests | |
run: | | |
cd examples/expo-app | |
npm install | |
# make sure we're using the version that was just packed above | |
npm update @supabase/supabase-js | |
npm run test || npm run test | |
- name: Stop Supabase | |
run: | | |
supabase stop |