|
20 | 20 |
|
21 | 21 | jobs: |
22 | 22 | test: |
23 | | - name: Test / OS ${{ matrix.os }} / Node ${{ matrix.node }} |
| 23 | + name: Unit + Type Check / Node.js ${{ matrix.node }} |
| 24 | + runs-on: ubuntu-latest |
24 | 25 | strategy: |
25 | 26 | matrix: |
26 | | - os: [ubuntu-latest] |
27 | | - node: ['20'] |
28 | | - |
29 | | - runs-on: ${{ matrix.os }} |
30 | | - |
| 27 | + node: [20] |
31 | 28 | steps: |
32 | 29 | - uses: actions/checkout@v4 |
33 | | - |
34 | | - - name: Set up Node |
35 | | - uses: actions/setup-node@v4 |
| 30 | + - uses: actions/setup-node@v4 |
36 | 31 | with: |
37 | 32 | node-version: ${{ matrix.node }} |
38 | 33 |
|
39 | | - - name: Run tests |
40 | | - run: | |
41 | | - npm clean-install |
42 | | - npm run test:coverage |
| 34 | + - run: npm clean-install |
| 35 | + |
| 36 | + - name: Type Check |
| 37 | + run: npm run test:types |
| 38 | + |
| 39 | + - name: Run Unit Tests + Coverage |
| 40 | + run: npm run test:coverage |
43 | 41 |
|
44 | 42 | - name: Upload coverage results to Coveralls |
45 | 43 | uses: coverallsapp/github-action@master |
46 | 44 | with: |
47 | 45 | github-token: ${{ secrets.GITHUB_TOKEN }} |
48 | 46 | path-to-lcov: ./test/coverage/lcov.info |
49 | 47 |
|
| 48 | + deno-tests: |
| 49 | + name: Deno Tests / ${{ matrix.deno }} |
| 50 | + runs-on: ubuntu-latest |
| 51 | + strategy: |
| 52 | + matrix: |
| 53 | + deno: ['1.x', '2.x'] |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v4 |
| 56 | + - uses: denoland/setup-deno@v2 |
| 57 | + with: |
| 58 | + deno-version: ${{ matrix.deno }} |
| 59 | + - uses: supabase/setup-cli@v1 |
| 60 | + with: |
| 61 | + version: latest |
| 62 | + - name: Start Supabase |
| 63 | + run: supabase start |
| 64 | + |
| 65 | + - name: Run Deno Tests |
| 66 | + run: | |
| 67 | + cd test/deno |
| 68 | + npm install |
| 69 | + npm test || npm test |
| 70 | +
|
| 71 | + - name: Run integration and browser tests on Deno 2.x only |
| 72 | + if: ${{ matrix.deno == '2.x' }} |
| 73 | + run: | |
| 74 | + npm run test:integration || npm run test:integration |
| 75 | + npm run test:integration:browser |
| 76 | +
|
| 77 | + - name: Stop Supabase |
| 78 | + run: supabase stop |
| 79 | + |
| 80 | + node-integration: |
| 81 | + name: Node Integration |
| 82 | + runs-on: ubuntu-latest |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v4 |
| 85 | + - uses: actions/setup-node@v4 |
| 86 | + with: |
| 87 | + node-version: 20 |
| 88 | + - uses: supabase/setup-cli@v1 |
| 89 | + with: |
| 90 | + version: latest |
| 91 | + - name: Start Supabase |
| 92 | + run: supabase start |
| 93 | + - run: | |
| 94 | + npm clean-install |
| 95 | + npm run build |
| 96 | + npm run test:integration || npm run test:integration |
| 97 | + - name: Stop Supabase |
| 98 | + run: supabase stop |
| 99 | + |
| 100 | + next-integration: |
| 101 | + name: Next.js Integration |
| 102 | + runs-on: ubuntu-latest |
| 103 | + steps: |
| 104 | + - uses: actions/checkout@v4 |
| 105 | + - uses: actions/setup-node@v4 |
| 106 | + with: |
| 107 | + node-version: 20 |
| 108 | + - uses: supabase/setup-cli@v1 |
| 109 | + with: |
| 110 | + version: latest |
| 111 | + - name: Start Supabase |
| 112 | + run: supabase start |
| 113 | + - run: | |
| 114 | + cd test/integration/next |
| 115 | + npm install |
| 116 | + npx playwright install |
| 117 | + npm run test |
| 118 | + - name: Stop Supabase |
| 119 | + run: supabase stop |
50 | 120 | integration: |
51 | 121 | name: Integration / OS ${{ matrix.os }} / Node ${{ matrix.node }} / Deno ${{ matrix.deno }} |
52 | 122 | strategy: |
|
0 commit comments