Skip to content

chore: checkbox mini #2723

chore: checkbox mini

chore: checkbox mini #2723

Workflow file for this run

name: Test
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- name: Cache
uses: actions/cache@v3
with:
path: |
node_modules
packages/**/node_modules
packages/zarm-cli/dist
packages/bem/lib
packages/zarm-icons/lib
key: setup-${{ github.sha }}
- name: Install dependencies
run: pnpm install
- name: Compile
run: pnpm --filter @zarm-design/* run build
lint:
needs: [setup]
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
node_modules
packages/**/node_modules
packages/zarm-cli/dist
packages/bem/lib
packages/zarm-icons/lib
key: setup-${{ github.sha }}
- name: Lint
run: pnpm run lint
test-cli:
needs: [setup]
name: Test @zarm-design/cli
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 16, 14, 12, 10]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
node_modules
packages/**/node_modules
packages/zarm-cli/dist
packages/bem/lib
packages/zarm-icons/lib
key: setup-${{ github.sha }}
- name: Test
run: pnpm --filter @zarm-design/cli run test
test:
needs: [setup]
name: Test zarm
runs-on: ubuntu-latest
strategy:
matrix:
react: ['16', '17', '18']
module: ['dom', 'umd']
env:
REACT: ${{ matrix.react }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- name: Restore Cache
uses: actions/cache@v3
with:
path: |
node_modules
packages/**/node_modules
packages/zarm-cli/dist
packages/bem/lib
packages/zarm-icons/lib
key: setup-${{ github.sha }}
- name: Install React v16
if: ${{ matrix.react == '16' }}
run: pnpm --filter zarm run install-react-16
- name: Install React v18
if: ${{ matrix.react == '18' }}
run: pnpm --filter zarm run install-react-18
- name: Check umd
if: ${{ matrix.module == 'umd' }}
run: |
pnpm --filter zarm run build:umd
pnpm --filter zarm run filecheck
env:
NODE_OPTIONS: --max_old_space_size=4096
- name: Check umd bundlesize
if: ${{ matrix.module == 'umd' && matrix.react == '17' }}
run: pnpm --filter zarm run bundlesize
env:
BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE_GITHUB_TOKEN }}
- name: Test
if: ${{ matrix.module == 'dom' }}
run: pnpm --filter zarm run coverage
- name: Upload coverage
if: ${{ matrix.module == 'dom' && matrix.react == '17' }}
run: bash <(curl -s https://codecov.io/bash)