From 1d7ac48758462ba10d7e82de22119bb97277ee8c Mon Sep 17 00:00:00 2001 From: Iwan Aucamp Date: Sun, 9 Apr 2023 12:14:34 +0000 Subject: [PATCH] build: unify poetry version source 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 --- .github/workflows/docker-images.yaml | 14 ++++++-------- .github/workflows/validate.yaml | 18 ++++++++---------- .pre-commit-config.yaml | 2 +- devtools/requirements-poetry.in | 2 +- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker-images.yaml b/.github/workflows/docker-images.yaml index 7d755b3f0..81c73673c 100644 --- a/.github/workflows/docker-images.yaml +++ b/.github/workflows/docker-images.yaml @@ -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: | @@ -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: diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 9f65e91a7..dc95a79b4 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -65,7 +65,7 @@ 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 }}- @@ -73,10 +73,9 @@ jobs: 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: @@ -133,7 +132,7 @@ 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 }}- @@ -141,10 +140,9 @@ jobs: 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: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6e05165b1..b4dfbddc0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/devtools/requirements-poetry.in b/devtools/requirements-poetry.in index 55e389c80..b01ce00a4 100644 --- a/devtools/requirements-poetry.in +++ b/devtools/requirements-poetry.in @@ -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