Skip to content

Update dependency https://github.com/DiamondLightSource/python-copier… #2

Update dependency https://github.com/DiamondLightSource/python-copier…

Update dependency https://github.com/DiamondLightSource/python-copier… #2

Workflow file for this run

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

Check failure on line 37 in .github/workflows/_test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/_test.yml

Invalid workflow file

You have an error in your yaml syntax on line 37
- 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 }}