-
Notifications
You must be signed in to change notification settings - Fork 15
47 lines (45 loc) · 1.38 KB
/
tests.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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
env:
USING_COVERAGE: "3.8"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install libmagic (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
# Required for testing DICOM file generation by mime type
sudo apt update
sudo apt install -y libmagic1
- name: Install libmagic (macOS)
if: matrix.os == 'macos-latest'
run: brew install libmagic
- name: Install dependencies
run: |
python -m site
python -m pip install -U pip coverage setuptools wheel tox-gh-actions
- name: "Run tox targets for ${{ matrix.python-version }}"
run: python -m tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
if: "contains(env.USING_COVERAGE, matrix.python-version)"
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true