Skip to content

Commit 236b759

Browse files
committed
Test and build in separate jobs
1 parent 6dc8ad7 commit 236b759

File tree

1 file changed

+46
-4
lines changed

1 file changed

+46
-4
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,68 @@ 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+
60+
- name: Download articats
61+
uses: actions/download-artifact@v2
62+
63+
- name: Place built files
64+
shell: bash
65+
run: |
66+
mkdir bundle && mv artifact/* bundle/
67+
mkdir dist && mv artifact/* dist/
68+
mkdir dist-esm && mv artifact/* dist-esm/
69+
2870
- name: run the tests
29-
run: npm test
71+
run: npm run test:ava && npm run test:puppeteer:basic && npm run test:puppeteer:webpack
3072

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

0 commit comments

Comments
 (0)