-
Notifications
You must be signed in to change notification settings - Fork 97
66 lines (55 loc) · 1.58 KB
/
ci.yml
File metadata and controls
66 lines (55 loc) · 1.58 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
name: CI
on:
push:
branches: [main]
paths-ignore: &paths-ignore
- "docs/**"
- "!docs/.vitepress/config.ts"
- "images/**"
- ".devcontainer/**"
- "LICENSE"
- "CONTRIBUTING.md"
- "SECURITY.md"
pull_request:
branches: [main]
paths-ignore: *paths-ignore
permissions:
contents: read # Required for checking out code
jobs:
quality:
name: Code Quality & Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup mise
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
with:
experimental: true
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Check no files generated
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Error: Files were generated or modified after pnpm install"
git status --porcelain
exit 1
fi
- name: Run cicheck
run: pnpm cicheck
- name: Build
run: pnpm build
- name: Check no uncommitted changes after build
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Error: Uncommitted changes detected after build"
git status --porcelain
git diff
exit 1
fi
- name: Check build artifacts
run: |
test -f dist/index.js
test -f dist/index.cjs
test -f dist/index.d.ts
test -f dist/index.d.cts