Skip to content

Commit

Permalink
Merge pull request #6 from bosenqu/bosenqu/add-mypy-reports-to-summary
Browse files Browse the repository at this point in the history
Add mypy reports to CI summary
  • Loading branch information
bosenqu authored Dec 30, 2023
2 parents 168baec + dc06d7e commit af7fa3e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,19 @@ jobs:
run: make setup install-dev
- name: Lint with ruff, reformat-gherkin, and mypy
run: make lint-ci
- name: Add mypy reports to summary
run: |
echo "**Mypy line precision report**" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
cat reports/mypy/lineprecision.txt >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "**Mypy \`Any\` expression report**" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
cat reports/mypy/any-exprs.txt >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "**Mypy types of \`Any\` report**" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
cat reports/mypy/types-of-anys.txt >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ test:
# Run unit and feature tests with test (junit) and coverage (cobertura) report
.PHONNY: test-ci
test-ci:
rm -fr $(REPORTS)
$(PYTHON) -m coverage run --data-file $(REPORTS)/unit_tests/coverage.dat \
-m pytest -v --junitxml=$(REPORTS)/unit_tests/junit.xml
$(PYTHON) -m coverage run --data-file $(REPORTS)/feature_tests/coverage.dat \
Expand All @@ -67,7 +66,7 @@ lint:
# Run make lint with more verbose messages
.PHONNY: lint-ci
lint-ci:
$(PYTHON) -m mypy -v .
$(PYTHON) -m mypy -v --any-exprs-report $(REPORTS)/mypy/ --lineprecision-report $(REPORTS)/mypy/ .
$(PYTHON) -m ruff check -v .
$(VENV)/bin/reformat-gherkin --check tests/features

Expand Down

0 comments on commit af7fa3e

Please sign in to comment.