-
Notifications
You must be signed in to change notification settings - Fork 95
46 lines (39 loc) · 1.48 KB
/
poetry-requirements.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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