mirror of
https://github.com/layui/layui.git
synced 2026-02-09 02:09:18 +08:00
39 lines
730 B
YAML
39 lines
730 B
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- '*.x-stable'
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint code
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Check formatting with Prettier
|
|
run: |
|
|
npx prettier --write --log-level=warn .
|
|
git --no-pager diff --exit-code
|
|
|
|
- name: Lint code with ESLint
|
|
run: npx eslint .
|
|
|
|
# 串行运行测试
|
|
- name: Run tests with Jest
|
|
run: npx jest --ci --runInBand
|