Skip to content

first commit

first commit #15

name: Test, Lint and Format
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-lint-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.local/bin:$PATH"' >> $GITHUB_ENV
- name: Install dependencies
run: |
poetry install
- name: Run tests
run: |
poetry run pytest
- name: Run pylint
run: |
poetry run pylint --max-line-length=120 $(git ls-files '*.py')
- name: Run black
run: |
poetry run black --check --line-length 120 $(git ls-files '*.py')