Skip to content

Quote python versions #2

Quote python versions

Quote python versions #2

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- uses: actions/cache@v3
name: Cache Poetry packages
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Run tests
env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
run: poetry run python -m unittest discover -s tests
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- name: Run black
run: poetry run black --line-length=120 --target-version=py310 .
- name: Run isort
run: poetry run isort --line-length=120 --python-version=310 --profile=black --atomic .