Skip to content

Workflow file for this run

---
name: Run tests
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
codecov:
description: 'run codecov action after testing'
default: false
required: false
type: boolean
matrix-filter:
description: 'jq filter string indicating which configuration(s)
should be included'
default: '.'
required: false
type: string
repository:
description: 'repository to test if different from current'
default: ''
required: false
type: string
setup-repository:
description: 'repository used during job setup'
default: 'ros-infrastructure/ci'
required: false
type: string
jobs:
setup:
runs-on: ubuntu-latest
outputs:
strategy: ${{ steps.load.outputs.strategy }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.setup-repository }}
- id: load
run: |
strategy=$(jq -c -M '${{ inputs.matrix-filter }}' strategy.json)
echo "strategy=${strategy}" >> $GITHUB_OUTPUT
pytest:
needs: [setup]
strategy: ${{ fromJson(needs.setup.outputs.strategy) }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
- uses: actions/setup-python@v5
if: ${{ matrix.python }}
with:
python-version: ${{ matrix.python }}
- uses: actions/checkout@v4
with:
repository: ${{ inputs.setup-repository }}
path: ${{ runner.temp }}/ci-action
- uses: ${{ runner.temp }}/ci-action/
- uses: codecov/codecov-action@v3
if: ${{ inputs.codecov }}