Update dependency https://github.com/DiamondLightSource/python-copier… #2
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
| on: | ||
| workflow_call: | ||
| inputs: | ||
| python-version: | ||
| type: string | ||
| description: The version of python to install, default is from .python-version file | ||
| default: "" | ||
| runs-on: | ||
| type: string | ||
| description: The runner to run this job on | ||
| required: true | ||
| tests-path: | ||
| type: string | ||
| description: The path to look for tests | ||
| required: true | ||
| needs-services: | ||
| type: boolean | ||
| description: Whether to start external services | ||
| required: true | ||
| secrets: | ||
| CODECOV_TOKEN: | ||
| required: true | ||
| env: | ||
| # https://github.com/pytest-dev/pytest/issues/2042 | ||
| PY_IGNORE_IMPORTMISMATCH: "1" | ||
| UV_PYTHON: ${{ inputs.python-version }} | ||
| jobs: | ||
| run: | ||
| runs-on: ${{ inputs.runs-on }} | ||
| env: | ||
| COVERAGE_PROCESS_START: .coveragerc | ||
| steps: | ||
| <<<<<<< before updating | ||
| - name: Checkout repository (with submodules) | ||
| uses: actions/checkout@v4 | ||
| ======= | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| >>>>>>> after updating | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
| - name: Set TEMP to D:/Temp | ||
| if: inputs.runs-on == 'windows-latest' | ||
| run: | | ||
| mkdir "D:\\Temp" | ||
| echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| - if: inputs.needs-services && inputs.runs-on != 'windows-latest' | ||
| name: Run docker compose | ||
| uses: hoverkraft-tech/[email protected] | ||
| with: | ||
| compose-file: "./example-services/compose.yaml" | ||
| services: | | ||
| bl01t-di-cam-01 | ||
| ca-gateway | ||
| - name: Run tests win | ||
| if: inputs.runs-on == 'windows-latest' | ||
| run: uv run --locked tox -e tests -- --timeout=10 ${{ inputs.tests-path}} | ||
| - name: Non win tests | ||
| if: inputs.runs-on != 'windows-latest' | ||
| run: uv run --locked tox -e tests -- --timeout=2 ${{ inputs.tests-path}} | ||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| name: ${{ inputs.python-version }}/${{ inputs.runs-on }}/${{ inputs.tests-path }} | ||
| files: cov.xml | ||
| env: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||