-
Notifications
You must be signed in to change notification settings - Fork 51
136 lines (130 loc) · 3.48 KB
/
test-and-lint.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Test and Lint
on: pull_request
# Cancel actions when new commits are pushed to PR
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
test-core-lib:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
os: [
ubuntu-latest,
windows-latest,
macos-latest,
]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- uses: actions/cache@v2
id: cache
with:
path: aicsimageio/tests/resources
key: ${{ hashFiles('scripts/TEST_RESOURCES_HASH.txt') }}
- name: Download Test Resources
if: steps.cache.outputs.cache-hit != 'true'
run: |
python scripts/download_test_resources.py --debug
- name: Run tests with Tox
# Run tox using the version of Python in `PATH`
run: tox -e py
- name: Upload codecov
uses: codecov/codecov-action@v2
test-readers:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
os: [
ubuntu-20.04,
windows-latest,
macos-11,
]
tox-env: [
bioformats,
czi,
base-imageio,
dv,
lif,
nd2,
sldy,
bfio,
omezarr,
]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "11"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- uses: actions/cache@v2
id: cache
with:
path: aicsimageio/tests/resources
key: ${{ hashFiles('scripts/TEST_RESOURCES_HASH.txt') }}
- name: Download Test Resources
if: steps.cache.outputs.cache-hit != 'true'
run: |
python scripts/download_test_resources.py --debug
- name: Run tests with Tox
run: tox -e ${{ matrix.tox-env }}
- name: Upload codecov
uses: codecov/codecov-action@v2
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Lint
run: pre-commit run --all-files --show-diff-on-failure
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Install Dependencies
run: |
pip install --upgrade pip
pip install .[dev]
- name: Generate Docs
run: |
gitchangelog
make gen-docs