-
Notifications
You must be signed in to change notification settings - Fork 1.2k
88 lines (75 loc) · 2.11 KB
/
ci.yml
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
# this workflow will run on every pr to make sure the project is following the guidelines
# after labeler, run other actions with strict permissions
name: CI
on:
pull_request:
branches: ["*"]
merge_group:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
lint:
runs-on: ubuntu-latest
name: Run ESLint
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: pnpm turbo run lint
- run: pnpm manypkg check
check-changeset:
runs-on: ubuntu-latest
name: Check Changeset
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- name: Check and Validate Changes in /cli
run: |
git fetch origin main:main
changes=$(git diff --name-only main...${{ github.sha }} | grep '^cli/' || true)
if [[ -n "$changes" ]]; then
echo "Changes detected in /cli: $changes"
pnpm changeset status --since origin/main
exit_status=$?
if [[ $exit_status -eq 0 ]]; then
echo "Changeset validation succeeded."
else
echo "Changeset validation failed."
fi
else
echo "No changes detected in /cli"
fi
prettier:
runs-on: ubuntu-latest
name: Run Prettier
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: pnpm format:check
tsc:
runs-on: ubuntu-latest
name: Run Typechecker
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: pnpm typecheck
build-www:
runs-on: ubuntu-latest
name: Build and Check Astro
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: pnpm run --filter=www check
- run: pnpm turbo --filter=www build
# env:
# PUBLIC_GITHUB_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }}