forked from ryoppippi/ccusage
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 2.17 KB
/
ci.yaml
File metadata and controls
65 lines (56 loc) · 2.17 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
name: CI
on:
push:
pull_request:
jobs:
lint-check:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup-nix
- run: nix develop --command pnpm lint
- run: nix develop --command pnpm typecheck
test:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup-nix
- name: Create default Claude directories for tests
run: |
mkdir -p $HOME/.claude/projects
mkdir -p $HOME/.config/claude/projects
- run: nix develop --command pnpm run test
npm-publish-dry-run-and-upload-pkg-pr-now:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup-nix
- run: nix develop --command pnpm pkg-pr-new publish --pnpm './apps/*'
spell-check:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup-nix
- run: nix develop --command typos --config ./typos.toml
schema-check:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/setup-nix
- name: Generate schema files
run: nix develop --command pnpm run generate:schema
working-directory: apps/ccusage
- name: Check if schema files are up-to-date
run: |
if git diff --exit-code apps/ccusage/config-schema.json docs/public/config-schema.json; then
echo "✅ Schema files are up-to-date"
else
echo "❌ Schema files are not up-to-date. Please run 'pnpm run generate:schema' and commit the changes."
echo ""
echo "Changed files:"
git diff --name-only apps/ccusage/config-schema.json docs/public/config-schema.json
echo ""
echo "Diff:"
git diff apps/ccusage/config-schema.json docs/public/config-schema.json
exit 1
fi