-
-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (33 loc) · 912 Bytes
/
lint.yaml
File metadata and controls
40 lines (33 loc) · 912 Bytes
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
name: Lint
on:
push:
branches: [develop]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Create logs directory if it doesn't exist
run: mkdir -p logs
- name: Run Ruff and save results
run: |
timestamp=$(date +"%Y%m%d_%H%M%S")
ruff check . > logs/lint_result_${timestamp}.txt || true
- name: Run Ruff Format
run: ruff format --check . || true
- name: Upload lint results
uses: actions/upload-artifact@v4
with:
name: lint-results
path: logs/lint_result_*.txt
if: always()