This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
All tests passing 🎉 #162
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: Lint | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
poetry-version: ["1.2.2"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(f'Python {sys.version} on {sys.platform}')" | |
- name: Install Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Cache Poetry virtualenv | |
uses: actions/cache@v1 | |
id: cache | |
with: | |
path: ./.venv | |
key: poetry-lint-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
poetry-lint-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Set Poetry config | |
run: | | |
poetry config virtualenvs.in-project true | |
- name: Install Dependencies (with Lint) | |
run: poetry install | |
- name: Lint with flake8 | |
run: "poetry run flake8 ." | |
- name: Check Formatting with Black | |
run: "poetry run black . --check" | |
- name: Static type-check with MyPy | |
run: "poetry run mypy ." |