-
-
Notifications
You must be signed in to change notification settings - Fork 517
77 lines (73 loc) · 1.93 KB
/
ci.yml
File metadata and controls
77 lines (73 loc) · 1.93 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
name: CI — Typecheck, Lint & Format
on:
push:
branches:
- master
- develop
- 'hotfix/**'
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
- '.ddev/**'
pull_request:
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
- '.ddev/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
typecheck-and-lint:
name: Typecheck & Lint
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Use Node.js (from .nvmrc)
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Typecheck (tsc)
run: npx tsc --noEmit --pretty
- name: Format check (biome)
run: npx biome format .
- name: Lint check (biome)
run: npx biome check react/
format-fix:
name: Apply format fixes
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
persist-credentials: true
- name: Use Node.js (from .nvmrc)
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Apply Biome format
run: npx biome format --write .
- name: Apply Biome lint fixes
run: npx biome check --write react/
- name: Commit format changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "style: apply Biome format and lint fixes"