-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 2.1 KB
/
Copy pathci.yml
File metadata and controls
69 lines (66 loc) · 2.1 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate-and-build:
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
cache-dependency-path: site/package-lock.json
- run: npm ci --no-fund --no-audit
- name: TypeScript check
run: npm run typecheck
- name: i18n consistency
run: npm run audit:i18n
- name: SEO audit
run: npm run audit:seo
- name: Unit tests
run: npm test
- name: Production build
run: npm run build
env:
# ビルド成功確認のみ。本番デプロイ時は Cloudflare Pages 側で正しい値を設定
NEXT_PUBLIC_SITE_URL: https://example.pages.dev
- name: Upload build artifact (for inspection)
if: always()
uses: actions/upload-artifact@v4
with:
name: next-build-${{ github.sha }}
path: site/.next/
retention-days: 7
lighthouse:
runs-on: ubuntu-latest
needs: validate-and-build
timeout-minutes: 15
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
cache-dependency-path: site/package-lock.json
- run: npm ci --no-fund --no-audit
- run: npm run build
env:
NEXT_PUBLIC_SITE_URL: https://example.pages.dev
- name: Start server
run: |
npm start &
npx wait-on http://localhost:3000 -t 60000
- name: Lighthouse CI
run: npx --yes @lhci/cli@0.14 autorun --collect.url=http://localhost:3000/en --collect.url=http://localhost:3000/en/tools/bmi-calculator --upload.target=temporary-public-storage --assert.assertions.categories:performance=0.85 --assert.assertions.categories:accessibility=0.9 --assert.assertions.categories:seo=0.9
continue-on-error: true