Skip to content

Release 0.3 test

Release 0.3 test #7

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.11
- name: Conda create environemnt
shell: bash -l {0}
run: conda env create --name gk -f environment.yaml
- name: Conda activate
shell: bash -l {0}
run: conda activate gk
- run: conda run pip install pytest-github-actions-annotate-failures
- run: |
conda run pip install .
- run: |
conda run pip install black==24.1.1
- 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