diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ea10ca3bd..304b17ddd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -24,8 +24,25 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.8" - - name: Run pre-commit action - uses: pre-commit/action@v3.0.1 + - 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!