Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add matrix CI Tests on multiple Python versions and OS versions #353

Merged
merged 12 commits into from
Nov 13, 2023
Merged
53 changes: 53 additions & 0 deletions .github/workflows/matrix_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Matrix Testing CI
# this is similar to the pyart CI action
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# This job installs dependencies and runs tests across a matrix of python and OS versions.
#Add if: github.repository == 'tobac-project/tobac' to limit runs to tobac repo

jobs:
build:
name: ${{ matrix.os }}-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
if: github.repository == 'tobac-project/tobac'
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [macos, ubuntu, windows]

steps:
- uses: actions/checkout@v2

# Install micromamba and dependencies
- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-ci.yml
activate-environment: pyart-dev
cache-downloads: true
channels: conda-forge
channel-priority: strict
python-version: ${{ matrix.python-version }}

- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow

- name: Install tobac
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps --force-reinstall

- name: Run Tests
id: run_tests
shell: bash -l {0}
run: |
python -m pytest -v
15 changes: 15 additions & 0 deletions environment-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: pyart-dev
channels:
- conda-forge
dependencies:
- numpy
- scipy
- scikit-image
- scikit-learn
- pandas
- matplotlib
- iris
- xarray
- cartopy
- trackpy
- pytest
Loading