Skip to content

Commit 9b6ab83

Browse files
author
georgiy.rusanov
committed
separate jobs for different tests
1 parent 3fd050c commit 9b6ab83

File tree

1 file changed

+83
-13
lines changed

1 file changed

+83
-13
lines changed

.github/workflows/ci.yml

Lines changed: 83 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,103 @@ on:
2020

2121
jobs:
2222
test:
23-
name: Test / OS ${{ matrix.os }} / Node ${{ matrix.node }}
23+
name: Unit + Type Check / Node.js ${{ matrix.node }}
24+
runs-on: ubuntu-latest
2425
strategy:
2526
matrix:
26-
os: [ubuntu-latest]
27-
node: ['20']
28-
29-
runs-on: ${{ matrix.os }}
30-
27+
node: [20]
3128
steps:
3229
- uses: actions/checkout@v4
33-
34-
- name: Set up Node
35-
uses: actions/setup-node@v4
30+
- uses: actions/setup-node@v4
3631
with:
3732
node-version: ${{ matrix.node }}
3833

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
4341

4442
- name: Upload coverage results to Coveralls
4543
uses: coverallsapp/github-action@master
4644
with:
4745
github-token: ${{ secrets.GITHUB_TOKEN }}
4846
path-to-lcov: ./test/coverage/lcov.info
4947

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
50120
integration:
51121
name: Integration / OS ${{ matrix.os }} / Node ${{ matrix.node }} / Deno ${{ matrix.deno }}
52122
strategy:

0 commit comments

Comments
 (0)