Skip to content

Commit

Permalink
Add CI tests with minimum supported versions (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau authored Dec 6, 2023
1 parent a465230 commit c0eb49b
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 114 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test-mindeps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test minimum dependencies

on:
push:
pull_request:
workflow_dispatch:

# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

# Required shell entrypoint to have properly activated conda environments
defaults:
run:
shell: bash -l {0}

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout source
uses: actions/[email protected]
- name: Setup Conda Environment
uses: conda-incubator/[email protected]
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
channel-priority: strict
environment-file: ci/environment-mindeps.yaml
activate-environment: test-environment
auto-activate-base: false

- name: Install
run: python -m pip install --no-deps -e .

- name: mamba list
run: mamba list

- name: Test
run: bash scripts/test.sh

- name: Upload coverage
uses: codecov/codecov-action@v1
26 changes: 26 additions & 0 deletions ci/environment-mindeps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# NOTE: Minimum dependencies are defined in `pyproject.toml`.
# This file is only used for testing purposes.
# When making changes to minimum dependencies, make sure both this file
# and `pyproject.toml` are consistent with each other.
name: test-environment
channels:
- conda-forge
dependencies:
# required dependencies
- python=3.8
- python-cmr=0.9.0
- pqdm=0.1
- requests=2.26
- s3fs=2022.11
- fsspec=2022.11
- tinynetrc=1.3.1
- multimethod=1.8
- python-dateutil=2.8.2
# test dependencies
- responses
- pytest
- pytest-cov
- mypy
- types-requests
- types-setuptools
- ruff
Loading

0 comments on commit c0eb49b

Please sign in to comment.