File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1717 lint :
1818 name : Code Quality Checks
1919 runs-on : ubuntu-latest
20+ continue-on-error : true
2021 steps :
2122 - uses : actions/checkout@v3
2223
3435
3536 - name : Run linting
3637 run : |
38+ mkdir -p linting_reports
3739 if [[ "${{ github.event_name }}" == "pull_request" ]]; then
3840 # In pull requests, auto-format the code
3941 black backend/
@@ -47,13 +49,19 @@ jobs:
4749 git push
4850 fi
4951 else
50- # In other events, just check formatting
51- black --check backend/
52- isort --check-only --profile black backend/
52+ # In other events, just check formatting but save output as JSON
53+ black --check --json backend/ > linting_reports/black_report.json || true
54+ isort --check-only --profile black backend/ || true
5355 fi
54- # Always run type checking and linting
55- flake8 backend/ --config=backend/.flake8
56- mypy backend/ --ignore-missing-imports
56+ # Always run type checking and linting with JSON output where possible
57+ flake8 --format=json backend/ --config=backend/.flake8 > linting_reports/flake8_report.json || true
58+ mypy backend/ --ignore-missing-imports --json-report linting_reports/mypy_report.json || true
59+
60+ - name : Upload linting reports
61+ uses : actions/upload-artifact@v3
62+ with :
63+ name : linting-reports
64+ path : linting_reports/
5765
5866 test :
5967 name : Run Tests
You can’t perform that action at this time.
0 commit comments