-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change from Travis CI to Github Actions
- Loading branch information
Showing
18 changed files
with
177 additions
and
97 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,8 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
# Require 1% coverage, i.e., always succeed | ||
target: 1 | ||
patch: false | ||
changes: false |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
name: climpred installs | ||
|
||
on: [push] | ||
|
||
jobs: | ||
install-climpred: # Installs climpred on various OS. | ||
name: Install climpred, ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . | ||
python -c "import climpred" |
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,61 @@ | ||
name: climpred testing | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: # Runs testing suite on various python versions. | ||
name: Test climpred, python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Conda environment | ||
uses: conda-incubator/setup-miniconda@v1 | ||
with: | ||
auto-update-conda: true | ||
activate-environment: climpred-minimum-tests | ||
environment-file: ci/requirements/minimum-tests.yml | ||
python-version: ${{ matrix.python-version }} | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: conda info | ||
- name: Conda list | ||
shell: bash -l {0} | ||
run: conda list | ||
- name: Run tests | ||
shell: bash -l {0} | ||
run: | | ||
conda activate climpred-minimum-tests | ||
pytest --cov=climpred --cov-report=xml | ||
- name: Upload coverage to codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
fail_ci_if_error: true | ||
|
||
docs_notebooks: # Checks that pre-compiled notebooks in docs still work. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Conda environment | ||
uses: conda-incubator/setup-miniconda@v1 | ||
with: | ||
auto-update-conda: true | ||
activate-environment: climpred-docs-notebooks | ||
environment-file: ci/requirements/docs_notebooks.yml | ||
python-version: 3.6 | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: conda info | ||
- name: Conda list | ||
shell: bash -l {0} | ||
run: conda list | ||
- name: Test notebooks in docs | ||
shell: bash -l {0} | ||
run: | | ||
pushd docs | ||
nbstripout source/*.ipynb source/examples/decadal/*.ipynb source/examples/subseasonal/*.ipynb | ||
make html | ||
pop |
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,29 @@ | ||
name: Lint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lint: # Runs linting package checks for code styling. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Install linting dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 black==19.10b0 isort | ||
- name: Lint with flake8 | ||
shell: bash -l {0} | ||
run: | | ||
flake8 climpred | ||
- name: Lint with black | ||
shell: bash -l {0} | ||
run: | | ||
black --check climpred | ||
- name: Lint with isort | ||
shell: bash -l {0} | ||
run: | | ||
isort --recursive --check-only climpred |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ dependencies: | |
- jupyterlab | ||
- matplotlib | ||
- nbsphinx | ||
- nbstripout | ||
- nc-time-axis | ||
- netcdf4 | ||
- numpy | ||
|
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,29 @@ | ||
name: climpred-docs-notebooks | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- xesmf | ||
- esmpy | ||
- bottleneck | ||
- cartopy>=0.18.0 | ||
- esmtools>=1.1.3 | ||
- importlib_metadata | ||
- jupyterlab | ||
- matplotlib | ||
- nbsphinx | ||
- nbstripout | ||
- nc-time-axis | ||
- netcdf4 | ||
- numpy | ||
- pandas | ||
- pygments==2.6.1 | ||
- sphinx | ||
- sphinxcontrib-napoleon | ||
- sphinx_rtd_theme | ||
- toolz | ||
- tqdm | ||
- xarray>=0.16.1 | ||
- pip | ||
- pip: | ||
# Install latest version of climpred. | ||
- -e ../.. |
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,18 @@ | ||
name: climpred-minimum-tests | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- xesmf | ||
- esmpy | ||
- dask | ||
- netcdf4 | ||
- ipython | ||
- nc-time-axis | ||
- coveralls | ||
- pytest | ||
- pytest-cov | ||
- pip | ||
- pip: | ||
- pytest-lazy-fixture | ||
- -e ../.. |
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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
import pytest | ||
|
||
from climpred.versioning.print_versions import main, show_versions | ||
from climpred.versioning.print_versions import show_versions | ||
|
||
|
||
@pytest.mark.parametrize("as_json", [True, False]) | ||
def test_show_versions(as_json): | ||
show_versions(as_json=as_json) | ||
|
||
|
||
def test_main(): | ||
main() |
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