Skip to content

[cicd] add windows postgres action #16

[cicd] add windows postgres action

[cicd] add windows postgres action #16

Workflow file for this run

name: conda build
on: [ push ]
jobs:
build-linux:
runs-on: ubuntu-latest
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: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: '3.10'
- name: Install ESA SNAP
run: |
wget -nv https://download.esa.int/step/snap/10_0/installers/esa-snap_sentinel_linux-10.0.0.sh
bash esa-snap_sentinel_linux-10.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: |
conda install -y python=3.10 flake8 pytest coverage
conda env update --file environment.yml --name base
- 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
env:
PGUSER: postgres
PGPASSWORD: Password12!
- name: Publish to coveralls.io
uses: coverallsapp/github-action@v2
with:
github-token: ${{ github.token }}
build-windows:
runs-on: windows-latest
defaults:
run:
shell: cmd /C CALL {0}
services:
postgres:
image: postgis/postgis:16-3.4
env:
POSTGRES_PASSWORD: Password12!
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ps_test_dev
auto-update-conda: true
python-version: '3.10'
environment-file: environment-dev.yml
auto-activate-base: false
- uses: ireznik/postgis-action@v12
with:
postgresql version: '16'
postgresql password: 'Password12!'
postgresql user: 'postgres'
- name: Install ESA SNAP
run: |
curl -O https://download.esa.int/step/snap/10_0/installers/esa-snap_sentinel_windows-10.0.0.exe
start /wait esa-snap_sentinel_windows-10.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 pyroSAR
run: |
pip install .
- name: Test with pytest
run: |
echo %PATH%
dir C:\esa-snap\bin
pytest
env:
PGUSER: postgres
PGPASSWORD: Password12!