Skip to content

Commit

Permalink
Try CI with mambaforge on Linux+PyPy 3.7, macos, windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinvis committed Oct 14, 2021
1 parent 58404d0 commit 7848d88
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/condarc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pkgs_dirs:
- ~/conda_pkgs_dir
53 changes: 52 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.7']
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- name: Checkout
Expand Down Expand Up @@ -55,3 +55,54 @@ jobs:
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test-more:
name: test (${{ matrix.os }}, ${{ matrix.miniforge-variant }})
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "macos", "windows"]
include:
- os: ubuntu
condarc-file: .github/condarc.yml
environment-file: environment.yml
miniforge-variant: Mambaforge-pypy3
- os: macos
condarc-file: .github/condarc.yml
environment-file: environment.yml
miniforge-variant: Mambaforge
- os: windows
condarc-file: .github/condarc.yml
environment-file: environment.yml
miniforge-variant: Mambaforge
steps:
- uses: actions/checkout@v2

- name: Cache conda
uses: actions/cache@v2
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}

- uses: conda-incubator/setup-miniconda@v2
with:
condarc-file: ${{ matrix.condarc-file }}
environment-file: ${{ matrix.environment-file }}
miniforge-variant: ${{ matrix.miniforge-variant }}
use-mamba: true

- name: Verify Python environment
run: |
mamba list
- name: Install dependencies
run: |
pip install -e .[tests]
- name: Run tests
run: pytest -s -v -n 4
6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
channels:
- conda-forge

dependencies:
- xarray
- pydantic

0 comments on commit 7848d88

Please sign in to comment.