Skip to content

Commit 0435937

Browse files
authored
👷 Add GitHub Actions workflow to lint backend apart from tests (#1358)
1 parent 8d9af8c commit 0435937

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/lint-backend.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Lint Backend
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
12+
jobs:
13+
14+
lint-backend:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.10'
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v2
25+
with:
26+
version: "0.4.15"
27+
- run: uv run bash scripts/lint.sh
28+
working-directory: backend
29+
30+
# https://github.com/marketplace/actions/alls-green#why
31+
lint-backend-alls-green: # This job does nothing and is only used for the branch protection
32+
if: always()
33+
needs:
34+
- lint-backend
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Decide whether the needed jobs succeeded or failed
38+
uses: re-actors/alls-green@release/v1
39+
with:
40+
jobs: ${{ toJSON(needs) }}

0 commit comments

Comments
 (0)