Skip to content

Commit

Permalink
ci: mypy in linting github action
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunato committed Sep 24, 2024
1 parent 1d3070f commit 6b7c477
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
lint:
name: Linting (pre-commit)
name: Linting (pre-commit and mypy)
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
Expand All @@ -24,8 +24,25 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Run pre-commit action
uses: pre-commit/[email protected]
- name: Update pip
run: python -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
shell: bash
run: echo "DIR=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Get current week number
id: get-week
shell: bash
run: echo "WEEK=$(date +'%V')" >> $GITHUB_OUTPUT
- name: Pip cache
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.DIR }}
key: ${{ runner.os }}-pip-${{ steps.get-week.outputs.WEEK }}-${{ hashFiles('setup.cfg') }}
- name: Install tox
run: python -m pip install tox
- name: Run linters with tox
run: python -m tox -e linters

tests:
name: Test it!
Expand Down

0 comments on commit 6b7c477

Please sign in to comment.