Skip to content

Commit 53e4a40

Browse files
committed
Test and build in separate jobs
1 parent 6dc8ad7 commit 53e4a40

File tree

1 file changed

+44
-4
lines changed

1 file changed

+44
-4
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,66 @@ 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+
if: contains(matrix.os, 'ubuntu')
34+
uses: actions/upload-artifact@v2
35+
with:
36+
path: |
37+
./bundle
38+
./dist
39+
./dist-esm
40+
41+
# Testing the built files
42+
Test:
43+
needs: Build
44+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
45+
runs-on: ${{ matrix.os }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
node_version: [ '10', '12', '14' ]
50+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
51+
steps:
52+
- uses: actions/checkout@v2
53+
- name: Setup node
54+
uses: actions/setup-node@v2
55+
with:
56+
node-version: ${{ matrix.node }}
57+
58+
- name: install dependencies
59+
run: npm install --ignore-scripts
60+
61+
- name: Download articats
62+
uses: actions/download-artifact@v2
63+
64+
- name: Place built files
65+
shell: bash
66+
run: mv artifact/* .
67+
2868
- name: run the tests
29-
run: npm test
69+
run: npm run test:ava && npm run test:puppeteer:basic && npm run test:puppeteer:webpack
3070

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

0 commit comments

Comments
 (0)