Skip to content

Commit 23efc8b

Browse files
committed
Test and build in separate jobs
1 parent 6dc8ad7 commit 23efc8b

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

.github/workflows/ci.yml

+36-4
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,58 @@ env:
77
THREADS_WORKER_INIT_TIMEOUT: 15000
88

99
jobs:
10-
Test:
10+
# Building threads library from source
11+
Build:
1112
if: "!contains(github.event.head_commit.message, '[skip ci]')"
1213
runs-on: ${{ matrix.os }}
1314
strategy:
1415
fail-fast: false
1516
matrix:
16-
node_version: [ '10', '12', '14' ]
17+
node_version: ['15']
1718
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
1819
steps:
1920
- uses: actions/checkout@v2
2021
- name: Setup node
21-
uses: actions/setup-node@v2-beta
22+
uses: actions/setup-node@v2
2223
with:
2324
node-version: ${{ matrix.node }}
2425

2526
- name: install dependencies and build
2627
run: npm install
2728

29+
- name: Dev test
30+
run: npm run test:dev
31+
32+
- name: Upload artifacts
33+
uses: actions/upload-artifact@v2
34+
with:
35+
path: |
36+
./bundle
37+
./dist
38+
./dist-esm
39+
40+
# Testing the built files
41+
Test:
42+
needs: Build
43+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
44+
runs-on: ${{ matrix.os }}
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
node_version: [ '10', '12', '14' ]
49+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
50+
steps:
51+
- uses: actions/checkout@v2
52+
- name: Setup node
53+
uses: actions/setup-node@v2
54+
with:
55+
node-version: ${{ matrix.node }}
56+
57+
- name: install dependencies
58+
run: npm install --ignore-scripts
59+
2860
- name: run the tests
29-
run: npm test
61+
run: npm run test:ava && npm run test:puppeteer:basic && npm run test:puppeteer:webpack
3062

3163
Skip:
3264
if: contains(github.event.head_commit.message, '[skip ci]')

0 commit comments

Comments
 (0)