Skip to content

Commit

Permalink
Merge pull request #257 from CSHS-CWRA/micromamba
Browse files Browse the repository at this point in the history
Use mamba-org/provision-with-micromamba Action with caching
  • Loading branch information
Zeitsperre authored Jan 31, 2023
2 parents de80c4d + 5a4bcc5 commit 27eee37
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
black:
name: Code linting
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand All @@ -29,7 +29,7 @@ jobs:
pip:
name: Pip with Python${{ matrix.python-version }}
needs: black
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
include:
Expand Down Expand Up @@ -64,35 +64,34 @@ jobs:
conda:
name: Conda
needs: black
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- name: Setup miniconda with mamba
uses: conda-incubator/setup-miniconda@v2
- name: Setup Conda (Micromamba) with Python3.9
uses: mamba-org/provision-with-micromamba@main
with:
python-version: "3.9"
miniforge-variant: Mambaforge
channels: conda-forge,defaults
channel-priority: true
activate-environment: ravenpy-env
cache-downloads: true
environment-file: environment.yml
- name: Conda and mamba versions
extra-specs: |
mamba
python="3.9"
- name: Conda and Mamba versions
run: |
conda --version
mamba --version
- name: Install RavenPy
shell: bash -l {0}
run: |
pip install -e ".[dev]"
- name: List installed packages
shell: bash -l {0}
run: |
conda list
- name: Test RavenPy
shell: bash -l {0}
run: |
pytest --cov ravenpy
- name: Report coverage
shell: bash -l {0}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -103,7 +102,7 @@ jobs:
needs:
- pip
- conda
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Coveralls Finished
Expand Down

0 comments on commit 27eee37

Please sign in to comment.