Skip to content

Commit 0ebb5ec

Browse files
committed
updaeted ci-cd
1 parent 9a37f04 commit 0ebb5ec

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/ci-cd.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
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

@@ -34,6 +35,7 @@ jobs:
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

0 commit comments

Comments
 (0)