Skip to content

fix: port #16250 to v2 #18814

fix: port #16250 to v2

fix: port #16250 to v2 #18814

Workflow file for this run

name: CI
env:
# 7 GiB by default on GitHub, setting to 6 GiB
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NODE_OPTIONS: --max-old-space-size=6144
on:
push:
branches:
- main
- release/*
- feat/*
- fix/*
- perf/*
- v1
- v2
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
build:
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: [12, 14, 16, 17, 18]
include:
- os: macos-latest
node_version: 16
- os: macos-latest
node_version: 18
- os: windows-latest
node_version: 16
# Maybe bug with jest on windows and node-v18
# - os: windows-latest
# node_version: 18
fail-fast: false
name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 6
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: "pnpm"
- name: Install deps
run: pnpm install
- name: Build vite
run: pnpm run ci-build-vite
- name: Build plugin-vue
run: pnpm run build-plugin-vue
- name: Build plugin-react
run: pnpm run build-plugin-react
- name: Test serve
run: pnpm run test-serve -- --runInBand
- name: Test build
run: pnpm run test-build -- --runInBand
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
name: "Lint: node-16, ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 6
- name: Set node version to 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"
- name: Install deps
run: pnpm install
- name: Prepare
run: |
pnpm run ci-build-vite
pnpm run build-plugin-vue
- name: Lint
run: pnpm run lint
- name: Check formatting
run: pnpm prettier --check .