forked from landlab/landlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: use GitHub Actions for CI (landlab#1270)
* add github actions for ci * remove appveyor config file * add pyproject.toml * fix syntax error * reformat with black * only run black on source dirs * remove binnedlayers.py from version control * remove setup_requires * run black on everything * remove old .ci folder * install requirements as a separate step * reformat files in docs, notebooks with black * reformat versioneer.py with black * install build-system explicitly * install dependencies with conda * add numpy as a requirement * install a c compiler * always build docs, for now * fix syntax error * install requirements with mamba * drop python 3.9 builds * install docs requirements with pip * install landlab in editable mode * fix pip install command * remove linkcheck when building docs * use shapeTypeName instead of shapeType * remove notebook tests from testing step * set shapeType, not shapeTypeName * pop dbf keyword it is None * add new badges, remove old ones * remove unused import * add github action for testing the notebooks * update action names * create temp notebook script in current directory * fix for windows--use unique filename not tempfile * remove stray notebook
- Loading branch information
Showing
62 changed files
with
1,095 additions
and
771 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Black | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
lint: | ||
# We want to run on external PRs, but not on our own internal PRs as they'll be run | ||
# by the push to the branch. Without this if check, checks are duplicated since | ||
# internal PRs match both the push and pull_request events. | ||
if: | ||
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | ||
github.repository | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: psf/black@stable | ||
with: | ||
black_args: ". --check" |
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,59 @@ | ||
name: Documentation | ||
|
||
on: [push, pull_request] | ||
# on: | ||
# push: | ||
# paths: | ||
# - "docs/**" | ||
# - "AUTHORS.rst" | ||
# - "CHANGES.rst" | ||
# - "CONTRIBUTING.rst" | ||
# - "LICENSE.rst" | ||
# - "README.rst" | ||
# pull_request: | ||
# paths: | ||
# - "docs/**" | ||
# - "AUTHORS.rst" | ||
# - "CHANGES.rst" | ||
# - "CONTRIBUTING.rst" | ||
# - "LICENSE.rst" | ||
# - "README.rst" | ||
|
||
jobs: | ||
build: | ||
# We want to run on external PRs, but not on our own internal PRs as they'll be run | ||
# by the push to the branch. Without this if check, checks are duplicated since | ||
# internal PRs match both the push and pull_request events. | ||
if: | ||
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | ||
github.repository | ||
|
||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: 3.8 | ||
channels: conda-forge | ||
channel-priority: true | ||
|
||
- name: Show conda installation info | ||
run: | | ||
conda info | ||
conda list | ||
- name: Install dependencies | ||
run: | | ||
conda install mamba | ||
mamba install --file=requirements.txt | ||
pip install -r requirements-docs.txt | ||
pip install -e . | ||
- name: Build documentation | ||
run: make -C docs clean html |
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,26 @@ | ||
name: Flake8 | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
lint: | ||
# We want to run on external PRs, but not on our own internal PRs as they'll be run | ||
# by the push to the branch. Without this if check, checks are duplicated since | ||
# internal PRs match both the push and pull_request events. | ||
if: | ||
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | ||
github.repository | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Lint | ||
run: | | ||
pip install flake8 | ||
flake8 landlab 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Notebooks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
# We want to run on external PRs, but not on our own internal PRs as they'll be run | ||
# by the push to the branch. Without this if check, checks are duplicated since | ||
# internal PRs match both the push and pull_request events. | ||
if: | ||
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | ||
github.repository | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge | ||
channel-priority: true | ||
|
||
- name: Show conda installation info | ||
run: | | ||
conda info | ||
conda list | ||
- name: Install requirements | ||
run: | | ||
conda install mamba | ||
mamba install --file=requirements.txt | ||
mamba list | ||
- name: Build and install package | ||
run: | | ||
pip install -e . | ||
- name: Install testing dependencies | ||
run: mamba install --file=requirements-testing.txt -c conda-forge | ||
|
||
- name: Test jupyter notebooks | ||
run: | | ||
python -c 'import landlab; print(landlab.__version__)' | ||
pip install -r requirements-notebooks.txt | ||
pytest notebooks --run-notebook -vvv |
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,60 @@ | ||
ssame: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
# We want to run on external PRs, but not on our own internal PRs as they'll be run | ||
# by the push to the branch. Without this if check, checks are duplicated since | ||
# internal PRs match both the push and pull_request events. | ||
if: | ||
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != | ||
github.repository | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge | ||
channel-priority: true | ||
|
||
- name: Show conda installation info | ||
run: | | ||
conda info | ||
conda list | ||
- name: Install requirements | ||
run: | | ||
conda install mamba | ||
mamba install --file=requirements.txt | ||
mamba list | ||
- name: Build and install package | ||
run: | | ||
pip install -e . | ||
- name: Install testing dependencies | ||
run: mamba install --file=requirements-testing.txt | ||
|
||
- name: Test | ||
run: | | ||
python -c 'import landlab; print(landlab.__version__)' | ||
pytest --cov=landlab --cov-report=xml:$(pwd)/coverage.xml -vvv | ||
- name: Coveralls | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' | ||
uses: AndreMiras/coveralls-python-action@v20201129 |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.