ci: add formatting for python files #48
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
os: | |
- ubuntu-latest | |
env: | |
PG: 14 | |
APT: "apt-get -o Dpkg::Progress=0 -o Dpkg::Use-Pty=0" | |
API_KEY: $ {{ secrets.LDS_TEST_API_KEY }} | |
DOMAIN: $ {{ secrets.LDS_TEST_DOMAIN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade poetry | |
- name: Install | |
run: | | |
poetry install | |
- name: Format | |
run: | | |
poetry run pre-commit run --all-files | |
- name: Run tests | |
run: | | |
cd tests | |
poetry run python -m unittest tests |