forked from colcon/ci
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 1.7 KB
/
pytest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
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 }}