Skip to content

require spatialist>=0.15.1, req. file restructuring #79

require spatialist>=0.15.1, req. file restructuring

require spatialist>=0.15.1, req. file restructuring #79

Workflow file for this run

name: conda build
on: [ push ]
jobs:
build-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: micromamba-shell {0}
services:
postgres:
image: postgis/postgis:16-3.4
env:
POSTGRES_PASSWORD: Password12!
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
cache-environment: true
init-shell: bash
generate-run-shell: true
post-cleanup: 'all'
- name: Install ESA SNAP
run: |
wget -nv https://download.esa.int/step/snap/12.0/installers/esa-snap_all_linux-12.0.0.sh
bash esa-snap_all_linux-12.0.0.sh -q -dir $GITHUB_ACTION_PATH/esa-snap
- name: Set paths and variables
run: |
echo "$CONDA/bin" >> $GITHUB_PATH
echo "$GITHUB_ACTION_PATH/esa-snap/bin" >> $GITHUB_PATH
echo "PROJ_DATA=$CONDA/share/proj" >> $GITHUB_ENV
- name: Install python packages
run: |
micromamba install -y python=3.10 flake8 -n ps_test
micromamba env update --file environment-dev.yml -n ps_test
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install pyroSAR
run: |
pip install .
- name: Test with pytest
run: |
coverage run -m pytest
coverage xml
env:
PGUSER: postgres
PGPASSWORD: Password12!
- name: Publish to coveralls.io
uses: coverallsapp/github-action@v2
with:
github-token: ${{ github.token }}
format: cobertura
build-windows:
runs-on: windows-latest
defaults:
run:
shell: cmd /C CALL {0}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ps_test_dev
auto-update-conda: true
python-version: '3.12'
environment-file: environment.yml
auto-activate-base: false
- uses: nyurik/action-setup-postgis@v2
with:
cached-dir: C:\downloads
- name: Install ESA SNAP
run: |
curl -O https://download.esa.int/step/snap/12.0/installers/esa-snap_all_windows-12.0.0.exe
start /wait esa-snap_all_windows-12.0.0.exe -q -dir C:\esa-snap
- name: Set paths and variables
run: |
echo %CONDA%\Scripts>> %GITHUB_PATH%
echo C:\esa-snap\bin>> %GITHUB_PATH%
echo PROJ_DATA=%CONDA%\share\proj>> %GITHUB_ENV%
- name: Install python packages
run: |
conda env update --file environment-dev.yml --name ps_test_dev
- name: Install pyroSAR
run: |
pip install .
- name: Test with pytest
run: |
pytest
env:
PGUSER: postgres
PGPASSWORD: postgres