Skip to content

Commit af10af8

Browse files
committed
chore: add backend ci
1 parent 88b5ffb commit af10af8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/backend_lint.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Backend Lint and Code Formatting Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
branches:
10+
- main
11+
- dev
12+
13+
jobs:
14+
frontend-lint-and-format:
15+
runs-on: ubuntu-latest
16+
steps:
17+
# Step 1: Check out the code
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
# Step 2: Set up Node.js
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.12"
26+
27+
# Step 3: Install dependencies
28+
- name: Install dependencies
29+
run: |
30+
pip install -r requirements.txt
31+
working-directory: backend
32+
33+
# Step 4: Run Ruff Lint
34+
- name: Run Ruff Lint
35+
run: |
36+
ruff check .
37+
working-directory: backend
38+
39+
# Step 5: Run Ruff for formatting
40+
- name: Run Ruff for formatting
41+
run: ruff format --check .
42+
working-directory: backend

0 commit comments

Comments
 (0)