Skip to content

build(deps-dev): bump black from 23.1.0 to 24.3.0 #34

build(deps-dev): bump black from 23.1.0 to 24.3.0

build(deps-dev): bump black from 23.1.0 to 24.3.0 #34

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: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 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" ]
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 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