Skip to content

🧪 Test GitHub Actions CI workflow #6

🧪 Test GitHub Actions CI workflow

🧪 Test GitHub Actions CI workflow #6

Workflow file for this run

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 ci
- 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