Skip to content

Release 0.3 test

Release 0.3 test #1

Workflow file for this run

name: Unit Tests
on:
pull_request:
types: [opened, reopened, edited, assigned, synchronize]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.9
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: true
python-version: 3.9
- name: Conda create environemnt
shell: bash -l {0}
run: conda create --name gk
- name: Conda activate
shell: bash -l {0}
run: conda activate gk
- run: |
conda install -c conda-forge --yes --freeze-installed xesmf
- run: |
conda run pip install geopandas
- run: conda run pip install pytest-github-actions-annotate-failures
- run: |
conda run python setup.py install
- run: |
conda run pip install black==22.3.0
- name: Check formatting in `tests` catalog
run: conda run black -l 79 --preview tests
- name: Check formatting in `geokube` catalog
run: conda run black -l 79 --preview geokube
- name: Check for modified files
id: git-check
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
- name: Verify code formatting
if: steps.git-check.outputs.modified == 'true'
uses: actions/github-script@v3
with:
script: |
core.setFailed('`geokube` or `tests` directory is not well formatted! Use command `black -l 79 --preview geokube` and `black -l 79 --preview tests`')
- name: Run pytest
run: conda run pytest tests