-
Notifications
You must be signed in to change notification settings - Fork 16
116 lines (101 loc) · 2.77 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
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
name: Testing
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- '*'
jobs:
build-and-test:
name: Testing (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout@v2
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: dev
python-version: ${{ matrix.python-version }}
- name: Install Env
run: |
conda info
conda list
conda config --show
conda install --quiet --yes -c conda-forge pip numpy scipy pytest pytest-cov pydiso
- name: Install Our Package
run: |
pip install -v -e .
conda list
- name: Run Tests
run: |
pytest --cov-config=.coveragerc --cov-report=xml --cov=pymatsolver -s -v
- name: Test Documentation
if: ${{ matrix.os == 'ubuntu-latest' }} and {{ matrix.python-version == '3.8' }}
run: |
pip install -r requirements_docs.txt
cd docs
make html
cd ..
- name: Upload coverage
if: ${{ matrix.os == 'ubuntu-latest' }} and {{ matrix.python-version == '3.8' }}
uses: codecov/codecov-action@v2
with:
verbose: true # optional (default = false)
distribute:
name: Distributing from 3.8
needs: build-and-test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: dev
python-version: 3.8
- name: Install Env
run: |
conda info
conda list
conda config --show
conda install --quiet --yes -c conda-forge pip numpy scipy pydiso
pip install -r requirements_docs.txt
- name: Install Our Package
run: |
pip install -v -e .
- name: Generate Source Distribution
run: |
python setup.py sdist
- name: Build Documentation
run: |
cd docs
make html
cd ..
- name: GitHub Pages
uses: crazy-max/[email protected]
with:
build_dir: docs/_build/html
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: pypi-publish
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true