generated from ImperialCollegeLondon/pip-tools-template
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (39 loc) · 1.04 KB
/
ci_template.yml
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
name: Test
on:
workflow_call:
secrets:
codecov_token:
required: true
inputs:
os:
description: 'Operating system'
default: '["ubuntu-latest", "windows-latest"]'
type: string
python-version:
description: 'Python version'
default: '["3.10"]'
type: string
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ${{fromJson(inputs.os)}}
python-version: ${{fromJson(inputs.python-version)}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e .[dev]
- name: Run tests
run: pytest
- name: Upload coverage to Codecov
if: success() && (matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10')
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.codecov_token }}
verbose: true