lint graph/_*.py
#2257
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.yaml | |
- ci/311.yaml | |
- ci/312.yaml | |
- ci/312-dev.yaml | |
- ci/312-no-optional.yaml | |
include: | |
- environment-file: ci/312.yaml | |
os: macos-latest | |
- environment-file: ci/312.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 .; python -c 'import libpysal; libpysal.examples.fetch_all()' | |
- name: Spatial versions | |
run: | | |
python -c 'import geopandas; geopandas.show_versions();' | |
- name: Test libpysal | |
run: | | |
pytest -v --color yes --cov libpysal --cov-append --cov-report term-missing --cov-report xml . | |
- name: Codecov | |
uses: codecov/codecov-action@v3 | |
- name: Generate and publish the report | |
if: | | |
failure() | |
&& steps.status.outcome == 'failure' | |
&& github.event_name == 'schedule' | |
&& github.repository_owner == 'pysal' | |
uses: xarray-contrib/issue-from-pytest-log@v1 | |
with: | |
log-path: pytest-log.jsonl |