Skip to content

Bump version: 1.10.0-dev → 1.10.0 #94

Bump version: 1.10.0-dev → 1.10.0

Bump version: 1.10.0-dev → 1.10.0 #94

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python Testing
on: [push]
jobs:
resources:
runs-on: ubuntu-latest
steps:
- name: Setup test-resources/
run: |
mkdir test-resources/
- name: Download IMG
run: curl "https://hirise-pds.lpl.arizona.edu/PDS/EDR/PSP/ORB_010500_010599/PSP_010502_2090/PSP_010502_2090_RED5_0.IMG" -o test-resources/PSP_010502_2090_RED5_0.img
- name: Tar file
run: tar -cvf img.tar test-resources/
- name: Upload img artifact
uses: actions/upload-artifact@v4
with:
name: img-artifact
path: img.tar
retention-days: 3
build:
needs: resources
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
# isis 4.4.0 apparently needs jpeg 9b, which is missing
isis-version: [5.0.2, 6.0.0, 7.2.0]
steps:
- name: Conda setup
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: false
channel-priority: flexible
channels: usgs-astrogeology, conda-forge
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Download IMG artifact
uses: actions/download-artifact@v4
with:
name: img-artifact
- name: Unpack Tar
run: |
tar -xvf img.tar
ls -R
- name: Install ISIS
run: |
micromamba create --name isis
micromamba activate isis
micromamba install -y isis=${{ matrix.isis-version }}
- name: Lint with flake8
run: |
micromamba activate isis
micromamba install -y flake8
# stop the build if there are Python syntax errors or undefined names
flake8 kalasiris tests --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 kalasiris tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test Install
run: python -m pip install -e .
- name: Test with pytest
run: |
micromamba activate isis
export ISISROOT=$MAMBA_ROOT_PREFIX/envs/isis
export ISISDATA=$MAMBA_ROOT_PREFIX/envs/isis
micromamba install -y pytest
python --version
pytest