Skip to content

Commit 22e7801

Browse files
authored
ci: add GitHub Actions workflow for automated linting
Closes #3
1 parent 0190b89 commit 22e7801

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
lint:
11+
name: Lint & Build Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci --if-present || npm install
26+
27+
- name: Lint (if configured)
28+
run: npm run lint --if-present || echo 'No lint script configured'
29+
30+
- name: Build check (if configured)
31+
run: npm run build --if-present || echo 'No build script configured'

0 commit comments

Comments
 (0)