Skip to content

Commit d2b420b

Browse files
committed
ci: sync with poetry-core changes
1 parent fe9f85b commit d2b420b

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/actions/bootstrap-poetry/action.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ runs:
3535
allow-prereleases: ${{ inputs.python-prereleases == 'true' }}
3636
update-environment: false
3737

38-
- run: >
39-
pipx install \
40-
${{ inputs.python-version != 'default' && format('--python "{0}"', steps.setup-python.outputs.python-path) || '' }} \
41-
'${{ inputs.poetry-spec }}'
38+
- run: pipx install ${{ inputs.python-version != 'default' && format('--python "{0}"', steps.setup-python.outputs.python-path) || '' }} '${{ inputs.poetry-spec }}'
4239
shell: bash
4340

4441
# Enable handling long path names (+260 char) on the Windows platform

.github/actions/poetry-install/action.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ inputs:
77
cache:
88
description: Enable transparent Poetry artifact and metadata caching
99
default: 'true'
10+
path:
11+
description: Path to Poetry project
12+
default: '.'
1013

1114
outputs:
1215
cache-hit:
@@ -33,18 +36,21 @@ runs:
3336
path: |
3437
${{ steps.poetry-config.outputs.cache-dir }}/artifacts
3538
${{ steps.poetry-config.outputs.cache-dir }}/cache
36-
key: poetry-${{ steps.get-date.outputs.date }}-${{ runner.os }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
39+
key: poetry-${{ steps.get-date.outputs.date }}-${{ runner.os }}-${{ hashFiles(format('{0}/pyproject.toml', inputs.path), format('{0}/poetry.lock', inputs.path)) }}
3740
# The cache is cross-platform, and other platforms are used to seed cache misses.
3841
restore-keys: |
3942
poetry-${{ steps.get-date.outputs.date }}-${{ runner.os }}-
4043
poetry-${{ steps.get-date.outputs.date }}-
4144
enableCrossOsArchive: true
4245

4346
- run: poetry install ${{ inputs.args }}
47+
working-directory: ${{ inputs.path }}
4448
shell: bash
4549

4650
- run: poetry env info
51+
working-directory: ${{ inputs.path }}
4752
shell: bash
4853

4954
- run: poetry show
55+
working-directory: ${{ inputs.path }}
5056
shell: bash

.github/workflows/tests.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Tests
22

33
on:
4-
push:
5-
pull_request:
64
merge_group:
5+
pull_request:
6+
push:
77

88
concurrency:
9-
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
9+
group: ${{ github.workflow }}-${{ github.ref }}
1010
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1111

1212
defaults:
@@ -101,10 +101,10 @@ jobs:
101101
# Use this matrix with multiple jobs defined in a reusable workflow:
102102
uses: ./.github/workflows/.tests-matrix.yaml
103103
name: ${{ matrix.os.name }} (Python ${{ matrix.python-version }})
104-
if: '!failure()'
104+
if: '!failure() && !cancelled()'
105105
needs:
106-
- lockfile
107106
- changes
107+
- lockfile
108108
with:
109109
runner: ${{ matrix.os.image }}
110110
python-version: ${{ matrix.python-version }}
@@ -127,7 +127,7 @@ jobs:
127127
status:
128128
name: Status
129129
runs-on: ubuntu-latest
130-
if: always()
130+
if: '!cancelled()'
131131
needs:
132132
- lockfile
133133
- smoke

0 commit comments

Comments
 (0)