Skip to content

Merge pull request #141 from exonet/dependabot/github_actions/patches… #344

Merge pull request #141 from exonet/dependabot/github_actions/patches…

Merge pull request #141 from exonet/dependabot/github_actions/patches… #344

Workflow file for this run

---
name: Typing
on:
push:
pull_request:
workflow_dispatch:
jobs:
mypy:
name: mypy on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Restore cached Python pip packages
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-${{ hashFiles('.github/workflows/requirements.txt') }}
restore-keys: |
pip-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-
- name: Install Poetry 1.5.1
if: ${{ matrix.python-version == '3.7' }}
uses: snok/install-poetry@93ada01c735cc8a383ce0ce2ae205a21c415379b #1.3.4
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install workflow dependencies
if: ${{ matrix.python-version != '3.7' }}
run: |
pip install -r .github/workflows/requirements.txt
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Restore cached Python venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: >-
venv-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
venv-${{ runner.os }}-v3-${{ steps.python.outputs.python-version }}-
- name: Install dependencies
run: poetry install --no-interaction
- name: Run mypy
run: poetry run mypy certbot_dns_exonet tests