Repository navigation
85 lines (71 loc) · 2.12 KB
/
Copy pathci.yml
File metadata and controls
85 lines (71 loc) · 2.12 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
paths:
- "packages/**"
- "demos/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "*.json"
- "*.js"
- "*.ts"
- "*.yaml"
- ".github/workflows/**"
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
verify-and-build:
runs-on: ubuntu-latest
if: (!github.event.pull_request || github.event.pull_request.draft == false)
env:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- name: Checkout repository
uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
name: Install pnpm
with:
run_install: false
- name: Use node.js
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: "pnpm"
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: build all packages
run: pnpm build
- name: Check code Style
run: pnpm lint-format
- name: Execute Linter
run: pnpm lint
- name: type checking
run: pnpm tsc
- name: ensure clean working directory
run: |
if files=$(git ls-files --exclude-standard --others --modified) && [[ -z "$files" ]]; then
exit 0
else
echo ""
echo "Working directory has been modified:"
echo ""
git status --short
echo ""
exit 1
fi