-
Notifications
You must be signed in to change notification settings - Fork 1
157 lines (150 loc) · 4.86 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: CI
on: pull_request
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: .node-version
- name: Install dependencies
run: bun install --frozen-lockfile
env:
HUSKY: 0
- name: Run Astro check
run: bun run check
- name: Run Biome
run: bun run biome:ci
- name: Run ls-lint
run: bun run lint:ls
- name: Check spelling
uses: crate-ci/typos@bd36f89fcd3424dcefd442894589e6ee572a59f2 # v1.28.1
- name: Run Textlint
run: bun run lint:text
- name: Run knip
run: bun run lint:knip
test-type:
name: Typecheck
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: .node-version
- name: Install dependencies
run: bun install --frozen-lockfile
env:
HUSKY: 0
- name: Build app
run: bun run build
- name: Run Vitest typecheck
run: bun run test:type
test-unit:
name: Unit Test
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: .node-version
- name: Install dependencies
run: bun install --frozen-lockfile
env:
HUSKY: 0
- name: Run Vitest
run: bun run test:unit
test-e2e:
name: E2E Test
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
matrix:
browser:
- chromium
- firefox
- webkit
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: .node-version
- name: Install dependencies
run: bun install --frozen-lockfile
env:
HUSKY: 0
- name: Setup Playwright
run: bunx playwright install --with-deps ${{ matrix.browser }}
- name: Build app
run: bun run build
- name: Run Playwright tests
run: bunx playwright test --project ${{ matrix.browser }}
vrt:
name: VRT
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: .node-version
- name: Install dependencies
run: bun install --frozen-lockfile
env:
HUSKY: 0
- name: Build app
run: bun run build
- name: Start server
run: bun run preview &
- name: Lost Pixel
uses: lost-pixel/lost-pixel@41055d71dea42eb5fa5c27dabd2a90722f376e33 # v3.22.0
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}
coverage:
name: Coverage
runs-on: ubuntu-24.04
needs: test-unit
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: .node-version
- name: Install dependencies
run: bun install --frozen-lockfile
env:
HUSKY: 0
- name: Generate coverage file
run: bun run coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5
with:
files: ./coverage/coverage-final.json