Skip to content

build(deps-dev): bump mypy from 1.5.1 to 1.6.0 #177

build(deps-dev): bump mypy from 1.5.1 to 1.6.0

build(deps-dev): bump mypy from 1.5.1 to 1.6.0 #177

Workflow file for this run

name: python
on:
push:
branches: [ main ]
tags: [ "*" ]
pull_request:
branches: [ main ]
jobs:
format:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
run: python -m pip install --user poetry
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Format with isort
run: poetry run isort .
- name: Format with black
run: poetry run black .
- name: Commit changes if any
run: |
git config user.name "GitHub Actions"
git config user.email "action@github.com"
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
git commit -m "style: Automatic code formatting" -a
git push
fi
test:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: [ "3.10", "3.11" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: python -m pip install --user poetry
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run pflake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run pflake8 . --count --exit-zero --max-complexity=10 --statistics
- name: Type-check with mypy
run: poetry run mypy .
- name: Test with pytest
run: poetry run python -m pytest