-
-
Notifications
You must be signed in to change notification settings - Fork 163
81 lines (70 loc) · 2.14 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: ci
on:
pull_request:
push:
env:
THREADS_WORKER_INIT_TIMEOUT: 15000
jobs:
# Building threads library from source
Build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version: ['15']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: install dependencies and build
run: npm install
- name: Dev test
run: npm run test:tooling
- name: Upload artifacts
if: contains(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v2
with:
path: |
./bundle
./dist
./dist-esm
./test-tooling/webpack/dist
# Testing the built files
Test:
needs: Build
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version: [ '10', '12', '14' ]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: install dependencies
run: npm install --ignore-scripts
- name: Download articats
uses: actions/download-artifact@v2
- name: Place built files
shell: bash
run: |
mkdir dist && mv artifact/dist/* ./dist
mkdir dist-esm && mv artifact/dist-esm/* ./dist-esm
mkdir bundle && mv artifact/bundle/* ./bundle
mkdir -p test-tooling/webpack/dist/ && mv artifact/test-tooling/webpack/dist/* ./test-tooling/webpack/dist/
- name: run the tests
run: npm run test:library && npm run test:puppeteer:basic && npm run test:puppeteer:webpack
Skip:
if: contains(github.event.head_commit.message, '[skip ci]')
runs-on: ubuntu-latest
steps:
- name: Skip CI 🚫
run: echo skip ci