Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/actions/bootstrap-poetry/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ runs:
allow-prereleases: ${{ inputs.python-prereleases == 'true' }}
update-environment: false

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

# Enable handling long path names (+260 char) on the Windows platform
Expand Down
8 changes: 7 additions & 1 deletion .github/actions/poetry-install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
cache:
description: Enable transparent Poetry artifact and metadata caching
default: 'true'
path:
description: Path to Poetry project
default: '.'

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

- run: poetry install ${{ inputs.args }}
working-directory: ${{ inputs.path }}
shell: bash

- run: poetry env info
working-directory: ${{ inputs.path }}
shell: bash

- run: poetry show
working-directory: ${{ inputs.path }}
shell: bash
12 changes: 6 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Tests

on:
push:
pull_request:
merge_group:
pull_request:
push:

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

defaults:
Expand Down Expand Up @@ -101,10 +101,10 @@ jobs:
# Use this matrix with multiple jobs defined in a reusable workflow:
uses: ./.github/workflows/.tests-matrix.yaml
name: ${{ matrix.os.name }} (Python ${{ matrix.python-version }})
if: '!failure()'
if: '!failure() && !cancelled()'
needs:
- lockfile
- changes
- lockfile
with:
runner: ${{ matrix.os.image }}
python-version: ${{ matrix.python-version }}
Expand All @@ -127,7 +127,7 @@ jobs:
status:
name: Status
runs-on: ubuntu-latest
if: always()
if: '!cancelled()'
needs:
- lockfile
- smoke
Expand Down