-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (43 loc) · 1.34 KB
/
pytest-builds.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
45
46
47
48
49
50
51
name: unit-tests
on:
push:
branches: [ master ]
pull_request:
jobs:
pytest:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools-rust pytest pydicom coverage pytest-cov
pip install git+https://github.com/pydicom/pylibjpeg-data
pip install -e .
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
pytest --cov rle
- name: Send coverage results
if: ${{ success() && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' }}
run: |
bash <(curl --connect-timeout 10 --retry 10 --retry-max-time \
0 https://codecov.io/bash) || (sleep 30 && bash <(curl \
--connect-timeout 10 --retry 10 --retry-max-time \
0 https://codecov.io/bash))