Skip to content

chore(develop): release 2.1.0 (#286) #596

chore(develop): release 2.1.0 (#286)

chore(develop): release 2.1.0 (#286) #596

Workflow file for this run

name: Python SDK quality checks and unit tests
on:
push:
paths:
- "openfoodfacts/**"
- "pyproject.toml"
- "poetry.lock"
- "tests/**"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --with=dev --all-extras
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Launch quality checks
run: |
poetry run flake8 .
poetry run black --check .
poetry run mypy .
poetry run isort --check .
- name: Test with pytest
run: |
poetry run pytest tests