Skip to content

Commit

Permalink
build: unify poetry version source
Browse files Browse the repository at this point in the history
Change the GitHub actions workflows to use the Poetry version specified in
`devtools/requirements-poetry.in` so that it becomes simpler to upgrade the
Poetry version.

Also upgrade the version of poetry from 1.4.0 to 1.4.2
  • Loading branch information
aucampia committed Apr 9, 2023
1 parent 89982f8 commit 1d7ac48
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/docker-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ jobs:
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.4.0
- name: Install poetry
run: |
pip install -r devtools/requirements-poetry.in
- name: Build images
shell: bash
run: |
Expand All @@ -70,10 +69,9 @@ jobs:
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.4.0
- name: Install poetry
run: |
pip install -r devtools/requirements-poetry.in
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,17 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.XDG_CACHE_HOME }}
key: ${{ github.job }}-xdg-v1-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml', '**/poetry.lock', '**/with-fuseki.sh', '**/*requirements*.txt') }}
key: ${{ github.job }}-xdg-v1-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml', '**/poetry.lock', '**/with-fuseki.sh', '**/*requirements*.txt', '**/*requirements*.in') }}
restore-keys: |
${{ github.job }}-xdg-v1-${{ matrix.os }}-${{ matrix.python-version }}-
${{ github.job }}-xdg-v1-${{ matrix.os }}-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.4.0
- name: Install poetry
run: |
pip install -r devtools/requirements-poetry.in
- uses: actions/setup-java@v3
if: ${{ matrix.extensive-tests }}
with:
Expand Down Expand Up @@ -133,18 +132,17 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.XDG_CACHE_HOME }}
key: ${{ github.job }}-xdg-v1-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml', '**/poetry.lock', '**/with-fuseki.sh', '**/*requirements*.txt') }}
key: ${{ github.job }}-xdg-v1-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml', '**/poetry.lock', '**/with-fuseki.sh', '**/*requirements*.txt', '**/*requirements*.in') }}
restore-keys: |
${{ github.job }}-xdg-v1-${{ matrix.os }}-${{ matrix.python-version }}-
${{ github.job }}-xdg-v1-${{ matrix.os }}-
- name: Set up Python ${{env.DEFAULT_PYTHON}}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.4.0
- name: Install poetry
run: |
pip install -r devtools/requirements-poetry.in
- name: Install Task
uses: arduino/setup-task@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
require_serial: true
args: ["."]
- repo: https://github.com/python-poetry/poetry
rev: 1.4.0
rev: 1.4.2
hooks:
- id: poetry-check
- id: poetry-lock
Expand Down
2 changes: 1 addition & 1 deletion devtools/requirements-poetry.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Fixing this here as readthedocs can't use the compiled requirements-poetry.txt
# due to conflicts.
poetry==1.4.0
poetry==1.4.2

0 comments on commit 1d7ac48

Please sign in to comment.