Tests #160
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: "59 23 * * 3" | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Manual test execution | |
default: test | |
required: false | |
jobs: | |
Tests: | |
name: ${{ matrix.os }}, ${{ matrix.environment-file }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
environment-file: [ci/latest.yaml] | |
include: | |
- environment-file: ci/dev.yaml | |
os: ubuntu-latest | |
- environment-file: ci/min.yaml | |
os: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- name: setup micromamba | |
uses: mamba-org/setup-micromamba@main | |
with: | |
environment-file: ${{ matrix.environment-file }} | |
micromamba-version: "latest" | |
- name: Install geodatasets | |
run: pip install . | |
- name: run tests | |
run: pytest -v . -m "not request" --cov=geodatasets --cov-append --cov-report term-missing --cov-report xml --color=yes | |
- name: test data | |
run: pytest -v . -m "request" --cov=geodatasets --cov-append --cov-report term-missing --cov-report xml --color=yes | |
if: matrix.os == 'ubuntu-latest' && matrix.environment-file == 'ci/latest.yaml' | |
- uses: codecov/codecov-action@v4 |