-
Notifications
You must be signed in to change notification settings - Fork 8
84 lines (77 loc) · 2.43 KB
/
python-package-conda.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
name: Python Package using Conda
on: [push]
jobs:
build-windows:
runs-on: windows-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
C:\Miniconda\condabin\conda.bat install tqdm openjpeg ruamel.yaml
python -m pip install --upgrade pip
pip install -r test_requirements.txt -U
pip install -r requirements.txt -U
pip install -e .
- name: Test with pytest
run: |
python -m pytest tests/
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install dependencies
run: |
conda install tqdm openjpeg ruamel.yaml
python -m pip install --upgrade pip
pip install -r test_requirements.txt -U
pip install -r requirements.txt -U
pip install -e .
- name: Lint with flake8
run: |
# flake8 already installed via test_requirements.txt
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest tests/
build-mac:
runs-on: macos-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
- name: Install dependencies
run: |
conda install tqdm openjpeg ruamel.yaml
brew install hdf5
export HDF5_DIR="$(brew --prefix hdf5)"
python -m pip install --upgrade pip
pip install -r test_requirements.txt -U --disable-pip-version-check
pip install -r requirements.txt -U --disable-pip-version-check
pip install -e . --disable-pip-version-check
- name: Test with pytest
run: |
python -m pytest tests/