Allow kw in clustering #1075
Workflow file for this run
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: Pytest | |
on: | |
workflow_dispatch: | |
release: | |
types: [created] | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
name: "${{ matrix.test }} on ${{ matrix.os }}, py${{ matrix.python-version }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: False | |
matrix: | |
test: [partial, minimal, notebook] | |
python-version: ["3.8", "3.9", "3.10"] | |
os: [ubuntu-latest, ubuntu-20.04] | |
exclude: | |
- test: notebook | |
os: ubuntu-20.04 | |
- test: minimal | |
os: ubuntu-20.04 | |
- test: partial | |
os: ubuntu-latest | |
- test: partial | |
python-version: "3.8" | |
- test: partial | |
python-version: "3.9" | |
defaults: | |
run: | |
# This is needed otherwise we can't activate the conda installation | |
shell: bash -l {0} | |
steps: | |
- name: Setup python | |
if: matrix.test == 'minimal' | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: minimal install | |
if: matrix.test == 'minimal' | |
run: | | |
pip install -r requirements.txt | |
pip install ../optim_esm_tools | |
python -c "import optim_esm_tools; optim_esm_tools.utils.print_versions()" | |
- uses: conda-incubator/setup-miniconda@v2 | |
if: matrix.test != 'minimal' | |
with: | |
installer-url: https://github.com/conda-forge/miniforge/releases/download/24.9.2-0/Miniforge3-24.9.2-0-Linux-x86_64.sh | |
allow-softlinks: true | |
show-channel-urls: true | |
use-only-tar-bz2: true | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
activate-environment: "synda" | |
# PARTIAL (speed up testing) | |
- name: run partial install | |
if: matrix.test != 'minimal' | |
run: | | |
conda activate synda | |
bash .github/scripts/install_env.sh "--no_synda" | |
- name: Run the notebook | |
if: matrix.test == 'notebook' | |
env: | |
NUMBA_DISABLE_JIT: 0 | |
run: | | |
pytest --cov optim_esm_tools -v --nbmake notebooks/*.ipynb --durations 0 --nb-coverage | |
coverage run --append --source=optim_esm_tools -m pytest -v --durations 0 | |
coverage report | |
- name: Run the tests | |
if: matrix.test == 'partial' | |
env: | |
NUMBA_DISABLE_JIT: 1 | |
_CACHE_TRUE: 1 | |
run: | | |
coverage run --append --source=optim_esm_tools -m pytest -v --durations 0 | |
coverage report | |
- name: Upload coverage | |
if: matrix.test != 'minimal' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: coveralls --service=github | |
- name: goodbye | |
run: echo goodbye |