Skip to content

Tests

Tests #2797

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches:
- "*"
schedule:
- cron: "0 0 * * 1,4"
workflow_dispatch:
inputs:
version:
description: Manual Unittest Run
default: test
required: false
jobs:
Test:
name: ${{ matrix.os }}, ${{ matrix.environment-file }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
environment-file:
- ci/310-oldest.yaml
- ci/310-latest.yaml
- ci/311-latest.yaml
- ci/312-min.yaml
- ci/312-latest.yaml
- ci/312-dev.yaml
include:
- environment-file: ci/312-latest.yaml
os: macos-13 # Intel
- environment-file: ci/312-latest.yaml
os: macos-14 # Apple Silicon
- environment-file: ci/312-latest.yaml
os: windows-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: "latest"
- name: Install libpysal
run: |
pip install .
- name: Spatial versions
run: |
python -c 'import geopandas; geopandas.show_versions();'
- name: Download test files
run: |
python -c '
import geodatasets
import libpysal
geodatasets.fetch("nybb")
geodatasets.fetch("geoda liquor_stores")
geodatasets.fetch("eea large_rivers")
geodatasets.fetch("geoda groceries")
geodatasets.fetch("geoda guerry")
libpysal.examples.fetch_all()
'
- name: Test libpysal
run: |
pytest -v --color yes -n auto --cov libpysal --cov-append --cov-report term-missing --cov-report xml .
- name: Codecov
uses: codecov/codecov-action@v4