Skip to content

Commit 3421ef5

Browse files
add lint pretty print to github workflow
1 parent bad24eb commit 3421ef5

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
poetry run coverage combine --keep coverage-python3.9*/.coverage
3434
cp .coverage ../ || true
3535
cp lint-python3.9/.lint.txt ../ || true
36+
cp lint-python3.9/.lint.json ../ || true
3637
cp security-python3.9/.security.json ../ || true
3738
3839
- name: Validate Artifacts
@@ -53,6 +54,5 @@ jobs:
5354
poetry run nox -s project:report -- -- --format markdown >> $GITHUB_STEP_SUMMARY
5455
echo -e "\n\n# Coverage\n" >> $GITHUB_STEP_SUMMARY
5556
poetry run coverage report -- --format markdown >> $GITHUB_STEP_SUMMARY
56-
echo -e "\n\n# Static Code Analysis\n" >> $GITHUB_STEP_SUMMARY
57-
cat .lint.txt >> $GITHUB_STEP_SUMMARY
57+
poetry run tbx lint pretty-print >> $GITHUB_STEP_SUMMARY
5858
poetry run tbx security pretty-print .security.json >> $GITHUB_STEP_SUMMARY

exasol/toolbox/nox/_artifacts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def check_artifacts(session: Session) -> None:
2323
error = False
2424
if msg := _validate_lint_txt(Path(PROJECT_CONFIG.root, ".lint.txt")):
2525
print(f"error in [.lint.txt]: {msg}")
26+
if msg := _validate_lint_json(Path(PROJECT_CONFIG.root, ".lint.json")):
27+
print(f"error in [.lint.json]: {msg}")
2628
if msg := _validate_security_json(Path(PROJECT_CONFIG.root, ".security.json")):
2729
print(f"error in [.security.json]: {msg}")
2830
error = True

exasol/toolbox/templates/github/workflows/report.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ jobs:
3131
working-directory: ./artifacts
3232
run: |
3333
poetry run coverage combine --keep coverage-python3.9*/.coverage
34-
cp .coverage ../
35-
cp lint-python3.9/.lint.txt ../
36-
cp security-python3.9/.security.json ../
34+
cp .coverage ../ || true
35+
cp lint-python3.9/.lint.txt ../ || true
36+
cp lint-python3.9/.lint.txt ../ || true
37+
cp security-python3.9/.security.json ../ || true
38+
39+
- name: Validate Artifacts
40+
run: poetry run nox -s artifacts:validate
3741

3842
- name: Generate Report
3943
run: poetry run nox -s project:report -- -- --format json | tee metrics.json
@@ -50,6 +54,5 @@ jobs:
5054
poetry run nox -s project:report -- -- --format markdown >> $GITHUB_STEP_SUMMARY
5155
echo -e "\n\n# Coverage\n" >> $GITHUB_STEP_SUMMARY
5256
poetry run coverage report -- --format markdown >> $GITHUB_STEP_SUMMARY
53-
echo -e "\n\n# Static Code Analysis\n" >> $GITHUB_STEP_SUMMARY
54-
cat .lint.txt >> $GITHUB_STEP_SUMMARY
57+
poetry run tbx security pretty-print >> $GITHUB_STEP_SUMMARY
5558
poetry run tbx security pretty-print .security.json >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)