-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (74 loc) · 2.36 KB
/
Copy pathci.yml
File metadata and controls
88 lines (74 loc) · 2.36 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
86
87
88
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.13'
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run build
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.build ? 0 : 1)"; then
bun run build
else
echo "No build script found; skipping."
fi
- name: Validate Ankhorage repository
run: bunx @ankhorage/ankh doctor validate .
- name: Run lint
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.lint ? 0 : 1)"; then
bun run lint
else
echo "No lint script found; skipping."
fi
- name: Run format check
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.['format:check'] ? 0 : 1)"; then
bun run format:check
else
echo "No format:check script found; skipping."
fi
- name: Run Knip
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.knip ? 0 : 1)"; then
bun run knip
else
echo "No knip script found; skipping."
fi
- name: Run tests
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.test ? 0 : 1)"; then
bun run test
else
echo "No test script found; skipping."
fi
- name: Run typecheck
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.typecheck ? 0 : 1)"; then
bun run typecheck
else
echo "No typecheck script found; skipping."
fi
- name: Check changesets
if: github.event_name == 'pull_request'
run: |
if node -e "const p=require('./package.json'); process.exit(p.scripts?.['changeset:status'] ? 0 : 1)"; then
bun run changeset:status
else
echo "No changeset:status script found; skipping."
fi