-
-
Notifications
You must be signed in to change notification settings - Fork 61
100 lines (95 loc) · 2.7 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: CI
on: [push, pull_request]
jobs:
prepare-yarn-cache:
name: Prepare Cache
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Update Yarn cache
env:
YARN_ENABLE_SCRIPTS: false # disable post-install scripts
YARN_NODE_LINKER: pnp # use pnp linker for better performance: it's meant to update yarn cache only
run: |
yarn dedupe --check
yarn install --immutable
lint:
name: Lint
needs: prepare-yarn-cache
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Install
run: yarn install
- name: Lint
run: yarn lint
- name: TSCheck
run: yarn tscheck
- name: Check compat-data
run: yarn build-es-shims-data
env:
CHECK_COMPAT_DATA: true
test:
name: Test on Node.js
needs: prepare-yarn-cache
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 16, 14, 12]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Test on Node.js ${{ matrix.node-version }}
# `maxWorkers` cannot be 1 because we are using `process.exitCode` in our tests.
run: yarn jest --ci --color --maxWorkers=2
env:
BABEL_TYPES_8_BREAKING: true
- name: Test the esm build
run:
yarn test:esm
test-windows:
name: Test on Windows
needs: prepare-yarn-cache
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
uses: actions/setup-node@v3
with:
node-version: latest
cache: 'yarn'
- name: Install
run: yarn install
- name: Build with bash
shell: bash
run: yarn build-es-shims-data
- name: Build
run: yarn build-corejs3-shipped-proposals && gulp build && gulp bundle
- name: Test on Node.js latest
# `maxWorkers` cannot be 1 because we are using `process.exitCode` in our tests.
run: yarn jest --ci --color --maxWorkers=2
env:
BABEL_TYPES_8_BREAKING: true
- name: Test the esm build
run:
yarn test:esm