Skip to content

✏️ Edit URLs to shapefiles from UNOSAT #436

✏️ Edit URLs to shapefiles from UNOSAT

✏️ Edit URLs to shapefiles from UNOSAT #436

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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
types: [opened, ready_for_review, reopened, synchronize]
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10", "3.11"]
os: [ubuntu-22.04]
# Is it a draft Pull Request (true or false)?
isDraft:
- ${{ github.event.pull_request.draft }}
# Exclude Ubuntu + Python 3.8 and 3.11 jobs for draft PRs
exclude:
- python-version: '3.8'
isDraft: true
- python-version: '3.11'
isDraft: true
# Only install optional packages on Ubuntu-22.04/Python 3.10 and 3.11
include:
- os: 'ubuntu-22.04'
python-version: '3.10'
extra-packages: '--extras "raster spatial stac vector"'
- os: 'ubuntu-22.04'
python-version: '3.11'
extra-packages: '--extras "raster spatial stac vector"'
steps:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# Install Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ matrix.python-version }}
# Install poetry package manager and dependencies from poetry.lock
- name: Install Poetry python dependencies
run: |
pip install poetry==1.6.1
poetry install ${{ matrix.extra-packages }}
poetry self add poetry-dynamic-versioning[plugin]
poetry show
# Run the unit tests and doctests
- name: Test with pytest
run: poetry run pytest --verbose --doctest-modules zen3geo/