-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from kaklise/master
Added GitHub actions
- Loading branch information
Showing
12 changed files
with
322 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master] | ||
pull_request: | ||
branches: [ master] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
python --version | ||
python -m pip install --upgrade pip | ||
pip install wheel | ||
pip install -r requirements.txt | ||
- name: Build wheel | ||
run: | | ||
python setup.py bdist_wheel | ||
ls dist/* | ||
- name: Save wheel | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheel | ||
path: dist/pecos*.whl | ||
|
||
test: | ||
name: Import test | ||
needs: build | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
os: [windows-latest, macOS-latest, ubuntu-latest] | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Download wheel | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: wheel | ||
- name: Install pecos | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install wheel | ||
pip install --find-links=. pecos | ||
- name: Import test | ||
run: | | ||
python -c "import pecos" | ||
windows: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
os: [windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python --version | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install coveralls | ||
python setup.py develop | ||
- name: Run Tests | ||
run: | | ||
coverage erase | ||
coverage run --context=${{ matrix.os }}.py${{ matrix.python-version }} --source=pecos --omit="*/tests/*" -m nose -v --nologcapture --with-doctest --traverse-namespace pecos | ||
env: | ||
COVERAGE_FILE: .coverage.${{ matrix.python-version }}.${{ matrix.os }} | ||
- name: Save coverage | ||
uses: actions/upload-artifact@v2 | ||
# if: ${{ matrix.os != 'windows-latest' }} | ||
with: | ||
name: coverage | ||
path: .coverage.${{ matrix.python-version }}.${{ matrix.os }} | ||
|
||
macOS: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
os: [macOS-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python --version | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install coveralls | ||
python setup.py develop | ||
- name: Run Tests | ||
run: | | ||
coverage erase | ||
coverage run --context=${{ matrix.os }}.py${{ matrix.python-version }} --source=pecos --omit="*/tests/*" -m nose -v --nologcapture --with-doctest --traverse-namespace --doctest-extension=.rst documentation/*.rst pecos | ||
env: | ||
COVERAGE_FILE: .coverage.${{ matrix.python-version }}.${{ matrix.os }} | ||
- name: Save coverage | ||
uses: actions/upload-artifact@v2 | ||
# if: ${{ matrix.os != 'windows-latest' }} | ||
with: | ||
name: coverage | ||
path: .coverage.${{ matrix.python-version }}.${{ matrix.os }} | ||
|
||
linux: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup conda | ||
uses: s-weigand/setup-conda@v1 | ||
with: | ||
update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
conda config --set always_yes yes --set changeps1 no | ||
python --version | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install coveralls | ||
python setup.py develop | ||
- name: Run Tests | ||
run: | | ||
coverage erase | ||
coverage run --context=${{ matrix.os }}.py${{ matrix.python-version }} --source=pecos --omit="*/tests/*" -m nose -v --nologcapture --with-doctest --doctest-extension=.rst --traverse-namespace documentation/*.rst pecos | ||
env: | ||
COVERAGE_FILE: .coverage.${{ matrix.python-version }}.${{ matrix.os }} | ||
- name: Save coverage | ||
uses: actions/upload-artifact@v2 | ||
# if: ${{ matrix.os != 'windows-latest' }} | ||
with: | ||
name: coverage | ||
path: .coverage.${{ matrix.python-version }}.${{ matrix.os }} | ||
|
||
coverage: | ||
needs: [ windows, macOS, linux ] | ||
runs-on: windows-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: actions/checkout@v2 | ||
- name: Install coverage | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install coveralls | ||
python setup.py develop | ||
- name: Download coverage artifacts from test matrix | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: coverage | ||
- name: Setup coverage and combine reports | ||
run: | | ||
echo "[paths]" > .coveragerc | ||
echo "source = " >> .coveragerc | ||
echo " pecos/" >> .coveragerc | ||
echo " pecos\\" >> .coveragerc | ||
echo " D:\\a\\pecos\\pecos\\pecos" >> .coveragerc | ||
echo " /home/runner/work/pecos/pecos/pecos" >> .coveragerc | ||
echo " /Users/runner/work/pecos/pecos/pecos" >> .coveragerc | ||
coverage combine | ||
- name: Create coverage report | ||
run: | | ||
coverage report | ||
coverage json --pretty-print | ||
coverage html --show-contexts | ||
- name: Save coverage JSON | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage | ||
path: coverage.json | ||
- name: Save coverage html | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage | ||
path: htmlcov | ||
|
||
coveralls: | ||
needs: [ windows, macOS, linux ] | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: actions/checkout@v2 | ||
- name: Install coverage | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install coveralls | ||
pip install -r requirements.txt | ||
python setup.py develop | ||
- name: Download coverage artifacts from test matrix | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: coverage | ||
- name: Setup coverage and combine reports | ||
run: | | ||
echo "[paths]" > .coveragerc | ||
echo "source = " >> .coveragerc | ||
echo " pecos/" >> .coveragerc | ||
echo " pecos\\" >> .coveragerc | ||
echo " D:\\a\\pecos\\pecos\\pecos" >> .coveragerc | ||
echo " /home/runner/work/pecos/pecos/pecos" >> .coveragerc | ||
echo " /Users/runner/work/pecos/pecos/pecos" >> .coveragerc | ||
coverage combine | ||
- name: Push to coveralls | ||
run: | | ||
coveralls --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: quick-check | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install --upgrade coverage nose | ||
python setup.py develop | ||
- name: Run tests | ||
run: | | ||
nosetests -v --nologcapture --with-doctest --with-coverage --cover-package=pecos --cover-min-percentage=70 pecos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: test_env | ||
channels: | ||
- defaults | ||
- http://conda.anaconda.org/pvlib | ||
dependencies: | ||
- python=3.9 | ||
- pandas | ||
- numpy | ||
- jinja2 | ||
- matplotlib | ||
- nose | ||
- pvlib | ||
- plotly | ||
- ephem | ||
- sqlalchemy | ||
- pip: | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.. _whatsnew_021: | ||
|
||
v0.2.1 (master) | ||
-------------------------- | ||
|
||
* Minor updates for testing and documentation | ||
* Added GitHub Actions and Python 3.9 tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Required | ||
pandas | ||
numpy | ||
jinja2 | ||
matplotlib | ||
|
||
# Optional | ||
nose | ||
pvlib | ||
plotly | ||
ephem | ||
sqlalchemy |