-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 1.29 KB
/
game-code-checks.yml
File metadata and controls
56 lines (48 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Game Code Checks
on:
push:
branches: [main]
paths:
- "tradcast_game/**"
- "storage/**"
- "utils/**"
- "configs/**"
- "game/**"
- ".github/workflows/game-code-checks.yml"
pull_request:
branches: [main]
paths:
- "tradcast_game/**"
- "storage/**"
- "utils/**"
- "configs/**"
- "game/**"
- ".github/workflows/game-code-checks.yml"
permissions:
contents: read
jobs:
lint-and-compile-game:
name: Lint and Compile (game service)
runs-on: ubuntu-latest
timeout-minutes: 10
env:
PYTHONDONTWRITEBYTECODE: "1"
FIRESTORE_EMULATOR_HOST: "127.0.0.1:9999"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install lint dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff
- name: Ruff check (runtime-risk rules only)
run: |
ruff check --select E9,F63,F7,F82 tradcast_game storage utils configs game
- name: Compile Python files (syntax check)
run: |
python -m compileall -q tradcast_game storage utils configs game