-
Notifications
You must be signed in to change notification settings - Fork 298
70 lines (70 loc) · 1.99 KB
/
tests.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
67
68
69
70
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
mypy:
name: mypy
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install pip dependencies
run: |
pip install cython numpy # needed for pycocotools
pip install .[datasets,tests,train]
pip install git+https://github.com/kornia/kornia@master # required for mypy fixes
- name: Run mypy checks
run: mypy .
pytest:
name: pytest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
exclude:
- os: windows-latest
python-version: 3.6
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install apt dependencies (Linux)
run: sudo apt-get install unrar
if: ${{ runner.os == 'Linux' }}
- name: Install brew dependencies (macOS)
run: brew install rar
if: ${{ runner.os == 'macOS' }}
- name: Install conda (Windows)
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
if: ${{ runner.os == 'Windows' }}
- name: Install conda dependencies (Windows)
run: |
conda install 'fiona>=1.5' h5py 'rasterio>=1.0.16'
conda list
conda info
if: ${{ runner.os == 'Windows' }}
- name: Install pip dependencies
run: |
pip install cython numpy # needed for pycocotools
pip install .[datasets,tests,train]
- name: Run pytest checks
run: pytest --cov=torchgeo --cov-report=xml
- name: Report coverage
uses: codecov/codecov-action@v2