Refactor chapter_05 pattern to pass mypy and flake8 checks #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Design patterns | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Install dependencies | |
run: poetry install --with dev | |
- name: flake8 lint | |
run: poetry run flake8 | |
- name: mypy type check | |
run: poetry run mypy . | |
- name: Test with pytest | |
run: poetry run pytest |