-
Notifications
You must be signed in to change notification settings - Fork 166
67 lines (66 loc) · 2.39 KB
/
tests-tox.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
63
64
65
66
name: Tests
on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312}
- {name: '3.12-MacOS', python: '3.12', os: macos-latest, tox: py312}
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
- {name: '3.11-min', python: '3.11', os: ubuntu-latest, tox: "py311-min"}
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
- {name: '3.9-min', python: '3.9', os: ubuntu-latest, tox: "py39-min"}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
- {name: '3.8-MacOS', python: '3.8', os: macos-latest, tox: py38}
- {name: Typing, python: '3.12', os: ubuntu-latest, tox: typing}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: 'requirements/*.txt'
- name: Update pip
run: |
pip install -U setuptools wheel
python -m pip install -U pip
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y liblzma-dev python3-dev r-bioc-dnacopy zlib1g-dev
- name: Install Mac OS dependencies
if: runner.os == 'macOS'
run: |
Rscript --no-environ -e "install.packages('BiocManager', repos='https://cloud.r-project.org'); BiocManager::install('DNAcopy')"
- name: Install test runner tools
run: pip install flake8 pytest tox
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Cache mypy
if: matrix.tox == 'typing'
uses: actions/cache@v4
with:
path: ./.mypy_cache
key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }}
- name: Run the unit test suite
run: tox -e ${{ matrix.tox }}