-
Notifications
You must be signed in to change notification settings - Fork 29
46 lines (45 loc) · 1.32 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
name: Pytest
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
conda-test:
name: Conda tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 5
matrix:
os: [ubuntu-20.04, macos-11]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda config --set always_yes yes --set changeps1 no
pip install -U -r requirements.txt -c constraints.txt
- name: Lint with pylint and pycodestyle
run: |
pip install -U -r requirements-dev.txt -c constraints.txt
python setup.py build_ext --inplace
pylint -rn mthree
pycodestyle --max-line-length=100 mthree
- name: Run tests with pytest
run: |
conda install pytest
python setup.py install
pytest -p no:warnings --pyargs mthree/test
- name: Build docs
run: |
conda install pandoc
cd docs
make html