-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.42 KB
/
Copy pathci.yml
File metadata and controls
63 lines (50 loc) · 1.42 KB
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Bootstrap packages
run: npx lerna bootstrap --no-ci
- name: Build packages
run: |
npm run build:simple
# 或者逐个构建
cd packages/modernx-core && npx father-build
cd ../modernx-immer && npx father-build
cd ../modernx-loading && npx father-build
cd ../modernx && npx father-build
- name: Run tests
run: npm test
env:
CI: true
NODE_ENV: test
NODE_OPTIONS: --max_old_space_size=4096
- name: Validate monorepo
run: npm run validate
- name: Check package sizes
run: |
echo "Package sizes:"
du -sh packages/*/dist || echo "No dist directories found"
- name: Upload coverage reports
if: matrix.node-version == '18.x'
uses: codecov/codecov-action@v3
with:
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella