Skip to content

Poetry init

Poetry init #39

Workflow file for this run

name: Testing and Linting
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
DIGIKEY_INVENTREE_TEST_MODE: "True"
DIGIKEY_INVENTREE_TEST_CONFIG_PATH: "tests/test_data/test_config.ini"
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: True
virtualenvs-in-project: True
installer-parallel: true
- name: Setup Cache
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Pytest
run: |
poetry run pytest --junitxml=junit/test-results.xml
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "inventree_digikey tests"