cleaning code #14
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: 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') |