Skip to content

Commit

Permalink
Migrate from Travis to Github Actions (#192)
Browse files Browse the repository at this point in the history
* Migrate from Travis to Github Actions

* Update tested Python versions

* Remove broken old-pyproj test env
  • Loading branch information
TimoRoth committed Dec 9, 2020
1 parent 9ab7669 commit 3e8b770
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 61 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
source = salem
omit = */sandbox.py/*

concurrency = multiprocessing

[report]
omit = */sandbox.py/*
# Regexes for lines to exclude from consideration
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: ${{ matrix.test-env }}
strategy:
fail-fast: false
matrix:
test-env:
- py36-all
- py37-all
- py38-all
- py38-xarray-dev
- py38-all-rc
use-mpl:
- "--mpl"
include:
- test-env: py38-min
use-mpl: ""
- test-env: py38-xr
use-mpl: ""
runs-on: ubuntu-latest
defaults:
run:
shell: bash -leo pipefail {0}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: ci/requirements-${{ matrix.test-env }}.yml
activate-environment: test_env
auto-activate-base: false
auto-update-conda: true
- name: Install Self
run: pip install -e .
- name: Test
run: |
coverage erase
coverage run --source=./salem --parallel-mode --module pytest ${{ matrix.use-mpl }} --verbose salem
coverage combine
coverage xml
coverage report --skip-covered
env:
MPLBACKEND: agg
COVERAGE_RCFILE: ${{ github.workspace }}/.coveragerc
- name: Upload Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
run: coveralls
finish-coveralls:
name: Coveralls Finished
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Coveralls Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip3 install --upgrade coveralls &&
coveralls --finish
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge/label/rc
- conda-forge
dependencies:
- python=3.7
- python=3.8
- six
- numpy
- scipy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: test_env
channels:
- conda-forge
dependencies:
- python=3.7
- python=3.8
- six
- numpy
- scipy
- pyproj<2.0
- pyproj
- joblib
- netCDF4
- shapely
- geopandas<0.7.0
- geopandas
- rasterio
- pandas
- xarray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test_env
channels:
- conda-forge
dependencies:
- python=3.7
- python=3.8
- six
- numpy
- scipy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test_env
channels:
- conda-forge
dependencies:
- python=3.7
- python=3.8
- six
- numpy
- scipy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test_env
channels:
- conda-forge
dependencies:
- python=3.6
- python=3.8
- six
- numpy
- scipy
Expand Down

0 comments on commit 3e8b770

Please sign in to comment.