Skip to content

Bump Rust dependencies #427

Bump Rust dependencies

Bump Rust dependencies #427

Workflow file for this run

name: mypy
on:
push:
paths:
- '**/*.py'
- 'mypy.ini'
merge_group:
pull_request:
types: [opened, synchronize, reopened]
jobs:
mypy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Get pip cache directory
id: pip-cache
shell: bash
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Use cached venv or create it
uses: actions/cache/restore@v4
id: cache
with:
path: ${{ steps.pip-cache.outputs.dir }}
# The cache key depends on requirements.txt
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# Build a virtualenv, but only if it doesn't already exist
- name: Populate pip cache
run: pip install --require-hashes --no-deps -r requirements.txt
- name: Save cache
id: cache-save
uses: actions/cache/save@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ steps.cache.outputs.cache-primary-key }}
if: steps.cache.outputs.cache-hit != 'true'
- name: Register matcher
run: echo ::add-matcher::./.github/python_matcher.json
- name: Running mypy
# Start by "installing" sedpack to be sure all dependencies are listed
run: |
echo "PYTHONPATH=./src:$PYTHONPATH" >> $GITHUB_ENV
pip install -r test_requirements.txt
mkdir -p .mypy_cache
mypy --no-color-output --install-types --non-interactive src