Skip to content

Install & test PyPI package #10

Install & test PyPI package

Install & test PyPI package #10

# Test publishing to, and installing and running with Test PyPI
name: Install & test PyPI package
on:
workflow_dispatch:
jobs:
# Install homonim from Test PyPI and test CLI
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3 # checkout repository with test data
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install homonim from PyPI
run: |
python -m pip install --upgrade pip
python -m pip install --no-cache-dir --upgrade homonim
- name: Test homonim CLI
timeout-minutes: 5
run: |
cd tests/data
mkdir corrected
homonim fuse --help
homonim fuse -m gain-blk-offset -k 5 5 -od ./corrected -cmp -o ./source/ngi_rgb_byte_1.tif ./reference/landsat8_byte.tif
ls ./corrected/*
test -f ./corrected/ngi_rgb_byte_1_FUSE_cREF_mGAIN-BLK-OFFSET_k5_5.tif && echo "Test OK"