Skip to content

Commit

Permalink
feat(ci): enforce type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Oct 22, 2024
1 parent 16c0b20 commit 7befc05
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
if: github.event_name == 'pull_request'
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: '**.py'
- name: List all changed files
if: github.event_name == 'pull_request'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
touch changed-files.txt
for file in ${ALL_CHANGED_FILES}; do
echo "$file" >> changed-files.txt
done
cat changed-files.txt

- uses: astral-sh/setup-uv@v3
with:
Expand All @@ -53,18 +37,7 @@ jobs:
run: uv pip install --system -r requirements-dev.txt

- name: Run mypy
run: mypy --show-column-numbers weblate_web > mypy.log
# Temporary hack until we have this fully working
continue-on-error: true
- name: Report mypy
if: always()
run: |
echo "::add-matcher::.github/matchers/mypy.json"
if [ -f changed-files.txt ] ; then
if grep --silent --fixed-strings --file=changed-files.txt mypy.log ; then
grep --fixed-strings --file=changed-files.txt mypy.log
fi
else
cat mypy.log
fi
mypy --show-column-numbers weblate_web
echo "::remove-matcher owner=mypy::"

0 comments on commit 7befc05

Please sign in to comment.