Chore: Update Python dependencies #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # SPDX-FileCopyrightText: 2025 The Linux Foundation | |
| # Runs on a new pull request, performs build and runs tests | |
| name: 'Python Build/Test' | |
| # yamllint disable-line rule:truthy | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, reopened, edited, synchronize] | |
| branches: | |
| - main | |
| - master | |
| paths: | |
| - '**' | |
| - '!.github/**' | |
| - '!.*' | |
| - '!tox.ini' | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| python-build: | |
| name: 'Python Build' | |
| runs-on: 'ubuntu-24.04' | |
| outputs: | |
| matrix_json: "${{ steps.python-build.outputs.matrix_json }}" | |
| artefact_name: "${{ steps.python-build.outputs.artefact_name }}" | |
| artefact_path: "${{ steps.python-build.outputs.artefact_path }}" | |
| permissions: | |
| contents: read | |
| timeout-minutes: 12 | |
| env: | |
| GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| steps: | |
| # Harden the runner used by this workflow | |
| # yamllint disable-line rule:line-length | |
| - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 | |
| with: | |
| egress-policy: 'audit' | |
| # yamllint disable-line rule:line-length | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: 'Build Python project' | |
| id: python-build | |
| # yamllint disable-line rule:line-length | |
| uses: lfreleng-actions/python-build-action@1a8f154018f7527622152fcc36dd5974d3199db8 # v0.1.18 | |
| python-tests: | |
| name: 'Python Tests' | |
| runs-on: 'ubuntu-24.04' | |
| needs: 'python-build' | |
| # Matrix job | |
| strategy: | |
| fail-fast: false | |
| matrix: "${{ fromJson(needs.python-build.outputs.matrix_json) }}" | |
| permissions: | |
| contents: read | |
| timeout-minutes: 12 | |
| steps: | |
| # Harden the runner used by this workflow | |
| # yamllint disable-line rule:line-length | |
| - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 | |
| with: | |
| egress-policy: audit | |
| # yamllint disable-line rule:line-length | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: "Python tests [pytest] ${{ matrix.python-version }}" | |
| # yamllint disable-line rule:line-length | |
| uses: lfreleng-actions/python-test-action@bdde9e4e6221e858359f9036bd4f41ab3b1af90e # v0.1.11 | |
| with: | |
| python_version: ${{ matrix.python-version }} | |
| python-audit: | |
| name: 'Python Audit' | |
| runs-on: 'ubuntu-24.04' | |
| needs: 'python-build' | |
| # Matrix job | |
| strategy: | |
| fail-fast: false | |
| matrix: "${{ fromJson(needs.python-build.outputs.matrix_json) }}" | |
| permissions: | |
| contents: read | |
| timeout-minutes: 10 | |
| steps: | |
| # Harden the runner used by this workflow | |
| # yamllint disable-line rule:line-length | |
| - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 | |
| with: | |
| egress-policy: 'audit' | |
| # yamllint disable-line rule:line-length | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: "Audit dependencies ${{ matrix.python-version }}" | |
| # yamllint disable-line rule:line-length | |
| uses: lfreleng-actions/python-audit-action@bab5316468c108870eb759ef0de622bae9239aad # v0.2.2 | |
| with: | |
| python_version: "${{ matrix.python-version }}" | |
| notebooks: | |
| name: 'Test Jupyter Notebooks' | |
| runs-on: 'ubuntu-24.04' | |
| needs: 'python-build' | |
| # Matrix job | |
| strategy: | |
| fail-fast: false | |
| matrix: "${{ fromJson(needs.python-build.outputs.matrix_json) }}" | |
| permissions: | |
| contents: read | |
| timeout-minutes: 10 | |
| steps: | |
| # Harden the runner used by this workflow | |
| # yamllint disable-line rule:line-length | |
| - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 | |
| with: | |
| egress-policy: 'audit' | |
| # yamllint disable-line rule:line-length | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: "Notebook tests ${{ matrix.python-version }}" | |
| # yamllint disable-line rule:line-length | |
| uses: lfreleng-actions/python-notebook-test-action@3387386550d89ce9e9e5864aa793c67f9774b71f # v0.1.2 | |
| with: | |
| python_version: "${{ matrix.python-version }}" |