Skip to content

Commit 6df79b4

Browse files
committed
ci: add GitHub Actions for Next.js build and Python lint checks
1 parent 4f99aa3 commit 6df79b4

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/workflows/nextjs-build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Next.js Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- rebranding/bishop-state
8+
paths:
9+
- "codebenders-dashboard/**"
10+
11+
jobs:
12+
build:
13+
name: Type-check & build
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: codebenders-dashboard
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: "20"
25+
26+
- name: Install dependencies
27+
run: npm install --ignore-scripts
28+
29+
- name: Lint
30+
run: npm run lint
31+
32+
- name: Build
33+
run: npm run build
34+
env:
35+
# Prevent Next.js from failing at build time due to missing runtime env vars.
36+
# The pg pool is only instantiated at request time, not during build.
37+
NEXT_PUBLIC_PLACEHOLDER: "ci"

.github/workflows/python-lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Python Lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- rebranding/bishop-state
8+
paths:
9+
- "ai_model/**"
10+
- "operations/**"
11+
- "requirements.txt"
12+
13+
jobs:
14+
lint:
15+
name: Ruff lint
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.11"
24+
25+
- name: Install ruff
26+
run: pip install ruff
27+
28+
- name: Lint
29+
run: ruff check ai_model/ operations/

0 commit comments

Comments
 (0)