Repository navigation
chore(deps-dev): bump the python-dependencies group across 1 directory with 3 updates #344
Workflow file for this run
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
| --- | |
| # yamllint disable rule:comments | |
| # yamllint disable rule:truthy | |
| name: Lambda Unit Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - renovatebot | |
| paths: | |
| - modules/**/lambda/** | |
| - tests/conftest.py | |
| - tests/pytest.ini | |
| - tests/lambdas/** | |
| - tests/support/** | |
| - scripts/ci_summary.py | |
| - pyproject.toml | |
| - uv.lock | |
| - .github/workflows/lambda-tests.yml | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - modules/**/lambda/** | |
| - tests/conftest.py | |
| - tests/pytest.ini | |
| - tests/lambdas/** | |
| - tests/support/** | |
| - scripts/ci_summary.py | |
| - pyproject.toml | |
| - uv.lock | |
| - .github/workflows/lambda-tests.yml | |
| permissions: {} # Default deny; jobs declare only the permissions they need. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| unit-tests: | |
| name: Lambda unit tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| permissions: | |
| contents: read # Required to checkout repository content. | |
| issues: write # Required to create or update sticky PR summary comments. | |
| pull-requests: write # Required to publish summaries back to pull requests. | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout Repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| # Match the lambda runtime (python3.12) so imports/behaviour parity. | |
| python-version: '3.12' | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| version: 0.12.2 | |
| - name: Run unit tests | |
| working-directory: tests | |
| run: uv run --project .. --locked --only-group lambda-tests pytest -q lambdas --junitxml=pytest-results.xml | |
| - name: Write unit test summary | |
| if: always() | |
| working-directory: tests | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| python ../scripts/ci_summary.py \ | |
| --title "Lambda unit tests" \ | |
| --junit "Lambda unit tests=pytest-results.xml" \ | |
| --coverage coverage.xml \ | |
| --output lambda-test-summary.md \ | |
| --comment-marker forge-ci-summary:lambda-unit-tests | |
| - name: Upload coverage | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: lambda-test-results | |
| path: | | |
| tests/coverage.xml | |
| tests/pytest-results.xml | |
| tests/lambda-test-summary.md | |
| if-no-files-found: ignore |