Skip to content

Commit

Permalink
Merge pull request #11 from supabase-community/refactor/web-standard-…
Browse files Browse the repository at this point in the history
…apis

Web standard APIs (cross-platform support)
  • Loading branch information
gregnr authored Sep 11, 2024
2 parents c1c704e + 0237127 commit 6d67444
Show file tree
Hide file tree
Showing 58 changed files with 23,076 additions and 949 deletions.
32 changes: 32 additions & 0 deletions .github/actions/setup-playwright/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Setup and Cache Playwright'
description: 'Installs playwright browsers and caches them.'

inputs:
version:
description: 'The version of playwright'
required: true

outputs:
cache-hit:
description: 'Whether the cache was hit or not'
value: ${{ steps.playwright-cache.outputs.cache-hit }}

runs:
using: 'composite'
steps:
- name: Cache playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
key: playwright-browsers-${{ runner.os }}-${{ inputs.version }}
path: ~/.cache/ms-playwright

- name: Install playwright browsers if they don't exist
shell: bash
run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: Install playwright dependencies if binaries exist
shell: bash
run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests
on:
push:
branches: [main, next]
pull_request:
branches: [main, next]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build libs
run: npm run build
- name: Get playwright version
run: echo "PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')" >> $GITHUB_ENV
- name: Setup playwright
uses: ./.github/actions/setup-playwright
with:
version: ${{ env.PLAYWRIGHT_VERSION }}
- name: Tests
run: npm run test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ dbs/
tsconfig.tsbuildinfo
.env
.DS_Store
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@jsr:registry=https://npm.jsr.io
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
}
},
"deno.enable": true,
"deno.enablePaths": ["./packages/pg-gateway/test/deno"]
}
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
Expand Down
Loading

0 comments on commit 6d67444

Please sign in to comment.