|
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 |
|
50 |
| - integration: |
51 |
| - name: Integration / OS ${{ matrix.os }} / Node ${{ matrix.node }} / Deno ${{ matrix.deno }} |
| 48 | + deno-tests: |
| 49 | + name: Deno Tests / ${{ matrix.deno }} |
| 50 | + runs-on: ubuntu-latest |
52 | 51 | strategy:
|
53 | 52 | matrix:
|
54 |
| - os: [ubuntu-latest] |
55 |
| - node: ['20'] |
56 | 53 | deno: ['1.x', '2.x']
|
57 |
| - |
58 |
| - runs-on: ${{ matrix.os }} |
59 |
| - |
60 | 54 | steps:
|
61 | 55 | - uses: actions/checkout@v4
|
62 |
| - |
63 |
| - - name: Set up Node |
64 |
| - uses: actions/setup-node@v4 |
65 |
| - with: |
66 |
| - node-version: ${{ matrix.node }} |
67 |
| - |
68 | 56 | - uses: denoland/setup-deno@v2
|
69 | 57 | with:
|
70 | 58 | deno-version: ${{ matrix.deno }}
|
71 |
| - |
72 |
| - - name: Setup Supabase |
73 |
| - uses: supabase/setup-cli@v1 |
| 59 | + - uses: supabase/setup-cli@v1 |
74 | 60 | with:
|
75 | 61 | version: latest
|
76 | 62 |
|
77 | 63 | - name: Start Supabase
|
78 |
| - run: | |
79 |
| - supabase start |
| 64 | + run: supabase start |
80 | 65 |
|
81 |
| - - name: Build |
| 66 | + - name: Run Deno Tests |
82 | 67 | run: |
|
83 | 68 | npm clean-install
|
84 | 69 | npm run build
|
| 70 | + cd test/deno |
| 71 | + npm install |
| 72 | + npm test || npm test |
85 | 73 |
|
86 |
| - - name: Run tests |
| 74 | + - name: Run integration and browser tests on Deno 2.x only |
87 | 75 | if: ${{ matrix.deno == '2.x' }}
|
88 | 76 | run: |
|
| 77 | + npm run test:integration:browser |
| 78 | +
|
| 79 | + - name: Stop Supabase |
| 80 | + run: supabase stop |
| 81 | + |
| 82 | + node-integration: |
| 83 | + name: Node Integration |
| 84 | + runs-on: ubuntu-latest |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@v4 |
| 87 | + - uses: actions/setup-node@v4 |
| 88 | + with: |
| 89 | + node-version: 20 |
| 90 | + - uses: supabase/setup-cli@v1 |
| 91 | + with: |
| 92 | + version: latest |
| 93 | + |
| 94 | + - name: Start Supabase |
| 95 | + run: supabase start |
| 96 | + |
| 97 | + - name: Run integration tests |
| 98 | + run: | |
| 99 | + npm clean-install |
| 100 | + npm run build |
89 | 101 | npm run test:integration || npm run test:integration
|
90 |
| - # npm run test:integration:browser |
91 | 102 |
|
92 |
| - - name: Run Deno tests |
| 103 | + - name: Stop Supabase |
| 104 | + run: supabase stop |
| 105 | + |
| 106 | + next-integration: |
| 107 | + name: Next.js Integration |
| 108 | + runs-on: ubuntu-latest |
| 109 | + steps: |
| 110 | + - uses: actions/checkout@v4 |
| 111 | + - uses: actions/setup-node@v4 |
| 112 | + with: |
| 113 | + node-version: 20 |
| 114 | + - uses: supabase/setup-cli@v1 |
| 115 | + with: |
| 116 | + version: latest |
| 117 | + |
| 118 | + - name: Start Supabase |
| 119 | + run: supabase start |
| 120 | + |
| 121 | + - name: Install Playwright browsers and dependencies |
| 122 | + run: npx playwright install --with-deps |
| 123 | + |
| 124 | + - name: Run integration tests |
93 | 125 | run: |
|
94 |
| - cd test/deno |
95 |
| - npm test || npm test |
| 126 | + cd test/integration/next |
| 127 | + npm install |
| 128 | + npx playwright install |
| 129 | + npm run test |
96 | 130 |
|
97 | 131 | - name: Stop Supabase
|
| 132 | + run: supabase stop |
| 133 | + |
| 134 | + expo-tests: |
| 135 | + name: Expo Tests |
| 136 | + runs-on: ubuntu-latest |
| 137 | + steps: |
| 138 | + - uses: actions/checkout@v4 |
| 139 | + - uses: actions/setup-node@v4 |
| 140 | + with: |
| 141 | + node-version: 20 |
| 142 | + - uses: supabase/setup-cli@v1 |
| 143 | + with: |
| 144 | + version: latest |
| 145 | + |
| 146 | + - name: Start Supabase |
98 | 147 | run: |
|
99 |
| - supabase stop |
| 148 | + supabase start |
| 149 | +
|
| 150 | + - name: Build and test expo |
| 151 | + run: | |
| 152 | + npm clean-install |
| 153 | + npm run build |
| 154 | + PKG=$(npm pack) |
| 155 | + echo "Packed: $PKG" |
| 156 | + cd test/integration/expo |
| 157 | + npm install "../../../$PKG" |
| 158 | + npm install |
| 159 | + npm test || npm test |
| 160 | +
|
| 161 | + - name: Stop Supabase |
| 162 | + run: supabase stop |
0 commit comments