diff --git a/.github/actions/bootstrap-poetry/action.yaml b/.github/actions/bootstrap-poetry/action.yaml index cec135d8991..1ab66f8c0f1 100644 --- a/.github/actions/bootstrap-poetry/action.yaml +++ b/.github/actions/bootstrap-poetry/action.yaml @@ -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 diff --git a/.github/actions/poetry-install/action.yaml b/.github/actions/poetry-install/action.yaml index 9340d7bef80..37109a0ded0 100644 --- a/.github/actions/poetry-install/action.yaml +++ b/.github/actions/poetry-install/action.yaml @@ -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: @@ -33,7 +36,7 @@ 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 }}- @@ -41,10 +44,13 @@ runs: 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 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2d277c7bf7a..3d7be99f627 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -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: @@ -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 }} @@ -127,7 +127,7 @@ jobs: status: name: Status runs-on: ubuntu-latest - if: always() + if: '!cancelled()' needs: - lockfile - smoke