minor readme improvements #40
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: Format and Linting | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
formatting-linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install poetry | |
run: | | |
python -m pip install poetry | |
- name: Configure poetry | |
run: | | |
poetry config virtualenvs.in-project true | |
- name: Cache the virtualenv | |
uses: actions/cache@v2 | |
with: | |
path: ./.venv | |
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Format with black | |
run: | | |
poetry run black . | |
- name: Lint with ruff | |
run: | | |
poetry run ruff . | |
status-check: | |
needs: | |
# Require every other job in this workflow | |
- formatting-linting | |
runs-on: ubuntu-latest | |
steps: | |
# Every job needs at least one step, so run | |
# one that doesn't have any side effects | |
- run: echo ok |