Skip to content

Commit 05bf722

Browse files
authored
Merge branch 'apache:master' into master
2 parents a4c3bdb + 6776b10 commit 05bf722

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/lint.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v6
20+
21+
- uses: pnpm/action-setup@v4
22+
name: Install pnpm
23+
with:
24+
run_install: false
25+
26+
- name: Install Node.js
27+
uses: actions/setup-node@v6
28+
with:
29+
node-version: "22"
30+
cache: 'pnpm'
31+
32+
- name: Install dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Run ESLint and Check Formatting
36+
run: |
37+
pnpm lint:fix
38+
if [ -n "$(git status --porcelain -uno)" ]; then
39+
echo "Error: The codebase is not properly formatted or has linting issues that can be auto-fixed."
40+
echo "Please run 'pnpm lint:fix' locally, commit the changes, and push again."
41+
git status --porcelain -uno
42+
git diff
43+
exit 1
44+
fi
45+
46+
- name: Run Type Check
47+
run: pnpm exec tsc -b

0 commit comments

Comments
 (0)