Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub CI #644

Merged
merged 18 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build

on: [ push, pull_request ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Install packages
run: |
sudo apt-get -y install pandoc
if: matrix.python-version == 3.6
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
python -m pip install -e .[dev,gis]
- name: Lint
run: make lint
if: matrix.python-version == 3.6
- name: Test with pytest
run: |
pytest --cov xclim -m "not slow"
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Zeitsperre marked this conversation as resolved.
Show resolved Hide resolved
- name: Build docs 🏗️
run: make --directory=docs clean html
if: matrix.python-version == 3.6
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ ENV/
# autogenerated RestructuredText
/docs/modules.rst
/docs/xclim.core.rst
/docs/xclim.ensembles.rst
/docs/xclim.indicators.atmos.rst
/docs/xclim.indicators.land.rst
/docs/xclim.indicators.rst
Expand All @@ -119,3 +120,5 @@ ENV/
/docs/xclim.rst
/docs/xclim.sdba.rst
/docs/xclim.testing.rst
/docs/xclim.testing.tests.rst
/docs/xclim.testing.tests.test_sdba.rst
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ tox
coverage
twine
pytest
pytest-cov
pytest-runner
pylint
xdoctest
pydocstyle
pydocstyle>=5.1.1
nbval
pre-commit>=2.9
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ disable =
[pydocstyle]
convention = numpy
match = (?!test_).*\.py
match_dir = ^(?!(testing)).

[isort]
multi_line_output = 3
Expand Down