cleaning up #53
Workflow file for this run
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
name: Test Geodataset and publish | |
on: | |
push: | |
release: | |
types: [released] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
TEST_DATA_DIR: /netcdf | |
container: | |
image: nansencenter/geodataset:latest | |
env: | |
TEST_DATA_DIR: ${{ env.TEST_DATA_DIR }} | |
steps: | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.TEST_DATA_DIR }} | |
key: 0 | |
id: cache | |
- name: Download test data | |
run : | | |
mkdir -p $TEST_DATA_DIR | |
gdown https://drive.google.com/uc?id=1NmJeldiS5XlIwciDhej8Mas8g1Ng9T6n -O $TEST_DATA_DIR/ | |
gdown https://drive.google.com/uc?id=1j1zkyNDM9EwcvgipMskhuRDoe6mYBhnN -O $TEST_DATA_DIR/ | |
gdown https://drive.google.com/uc?id=1GvwVxIPi4S_0uJDiSeXURYKu8fCQlLxx -O $TEST_DATA_DIR/ | |
gdown https://drive.google.com/uc?id=1S0OLfr6DdJIflZC6mVbYTjKHj4XZ4TKg -O $TEST_DATA_DIR/ | |
gdown https://drive.google.com/uc?id=1RD9V1iS-tS0QIdg2IUyX_KR4PK3SpbFl -O $TEST_DATA_DIR/ | |
gdown https://drive.google.com/uc?id=1KGapeF6EG4h8gGPxNbkyRnRBYu3i7bdD -O $TEST_DATA_DIR/ | |
gdown https://drive.google.com/uc?id=1dRo0gfoJCinnOhA96YQpqnddhbdW_Z09 -O $TEST_DATA_DIR/ | |
gdown https://drive.google.com/uc?id=1JReSKt2nBKAf9mRwrbnoLQPewFqK2l93 -O $TEST_DATA_DIR/ | |
gdown https://drive.google.com/uc?id=1c1nyBFjNuM8njurt5FcK49Bz14R_O2Jx -O $TEST_DATA_DIR/ | |
if: steps.cache.outputs.cache-hit != 'true' | |
- uses: actions/checkout@v2 | |
- name: Test with pytest | |
run: | | |
pytest | |
publish: | |
needs: test | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Python package | |
run: > | |
GEODATASET_RELEASE="${GITHUB_REF#refs/tags/}" | |
python setup.py sdist bdist_wheel | |
- name: Publish Python package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_TOKEN }} |