Skip to content

Commit d5c99f1

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

File tree

1 file changed

+58
-45
lines changed

1 file changed

+58
-45
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,87 +20,100 @@ 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

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
5251
strategy:
5352
matrix:
54-
os: [ubuntu-latest]
55-
node: ['20']
5653
deno: ['1.x', '2.x']
57-
58-
runs-on: ${{ matrix.os }}
59-
6054
steps:
6155
- uses: actions/checkout@v4
62-
63-
- name: Set up Node
64-
uses: actions/setup-node@v4
65-
with:
66-
node-version: ${{ matrix.node }}
67-
6856
- uses: denoland/setup-deno@v2
6957
with:
7058
deno-version: ${{ matrix.deno }}
71-
72-
- name: Setup Supabase
73-
uses: supabase/setup-cli@v1
59+
- uses: supabase/setup-cli@v1
7460
with:
7561
version: latest
76-
7762
- name: Start Supabase
78-
run: |
79-
supabase start
63+
run: supabase start
8064

81-
- name: Build
65+
- name: Run Deno Tests
8266
run: |
83-
npm clean-install
84-
npm run build
67+
cd test/deno
68+
npm install
69+
npm test || npm test
8570
86-
- name: Run tests
71+
- name: Run integration and browser tests on Deno 2.x only
8772
if: ${{ matrix.deno == '2.x' }}
8873
run: |
8974
npm run test:integration || npm run test:integration
9075
npm run test:integration:browser
9176
92-
- name: Run Deno tests
93-
run: |
94-
cd test/deno
95-
npm test || npm test
77+
- name: Stop Supabase
78+
run: supabase stop
9679

97-
- name: Next.js Integration Tests
98-
run: |
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: |
99114
cd test/integration/next
100115
npm install
101116
npx playwright install
102117
npm run test
103-
104118
- name: Stop Supabase
105-
run: |
106-
supabase stop
119+
run: supabase stop

0 commit comments

Comments
 (0)