Skip to content

Revert Poetry lock export #5

Revert Poetry lock export

Revert Poetry lock export #5

name: Poetry requirements
on:
push:
branches:
- 'development'
jobs:
check_poetry_requirements:
name: 'Python ${{ matrix.python-version }}'
runs-on: ubuntu-latest
timeout-minutes: 10 # Don't run forever when stale
strategy:
matrix:
python-version:
- '3.11'
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cached dependencies & virtualenv
uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry/
~/dsmr-reader/.venv
key: dependencies-update-check-${{ hashFiles('poetry.lock') }}
- name: Export Poetry lock file
run: |
pip install --upgrade pip poetry
poetry self add poetry-plugin-export
poetry config virtualenvs.in-project true
poetry check
poetry export -f requirements.txt --without-urls --without-hashes --without dev --output poetry-export-base.txt
poetry export -f requirements.txt --without-urls --without-hashes --only dev --output poetry-export-dev.txt
- name: Compare Poetry export with requirements files
run: |
diff poetry-export-base.txt $GITHUB_WORKSPACE/dsmrreader/provisioning/requirements/base.txt
diff poetry-export-dev.txt $GITHUB_WORKSPACE/dsmrreader/provisioning/requirements/dev.txt