-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
94 additions
and
41 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,77 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup conda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
activate-environment: test | ||
mamba-version: "*" | ||
channels: conda-forge | ||
|
||
- name: Conda install dependencies | ||
shell: bash -l {0} | ||
run: | | ||
conda env update --file ci/env/environment.yml --name test | ||
- name: Install xyzspaces | ||
shell: bash -l {0} | ||
run: pip install .[dev] | ||
|
||
- name: Lint check | ||
shell: bash -l {0} | ||
run: | | ||
make clean | ||
make lint | ||
make typing | ||
- name: Test check | ||
shell: bash -l {0} | ||
env: | ||
XYZ_TOKEN: ${{ secrets.XYZ_TOKEN }} | ||
HERE_USER: ${{ secrets.HERE_USER }} | ||
HERE_PASSWORD: ${{ secrets.HERE_PASSWORD }} | ||
run: | | ||
pytest -v --durations=10 --cov-report=xml --cov=xyzspaces tests | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
flags: unittests | ||
|
||
- name: Build Docs and Changelog (Only on Linux for saving time) | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash -l {0} | ||
run: | | ||
make draft_changelog | ||
sh scripts/build_docs.sh | ||
- name: Publish package | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
verbose: true |
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.
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,13 @@ | ||
name: test | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- backoff>=1.10.0 | ||
- geojson | ||
- requests | ||
- geopandas | ||
- turfpy>=0.0.3 | ||
- geobuf | ||
- ijson==3.1.1 | ||
- pip: | ||
- "-r ../../requirements_dev.txt" |
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