Skip to content

Update README.md

Update README.md #36

Workflow file for this run

name: run_tests
on:
pull_request:
push:
branches: [main]
jobs:
unittest:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.9"]
test-subset:
- |
tests/
runs-on: ${{ matrix.os }}
env:
TEST_SUBSET: ${{ matrix.test-subset }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
env:
# Increase this value to reset cache if pymc_statespace.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda_envs/pymc_statespace.yml') }}
- name: Cache multiple paths
uses: actions/cache@v3
env:
# Increase this value to reset cache if requirements.txt has not changed
CACHE_NUMBER: 0
with:
path: |
~/.cache/pip
$RUNNER_TOOL_CACHE/Python/*
~\AppData\Local\pip\Cache
key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{
hashFiles('requirements.txt') }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
mamba-version: "*"
activate-environment: pymc-statespace
channel-priority: flexible
environment-file: conda_envs/pymc_statespace.yml
python-version: 3.9
use-mamba: true
use-only-tar-bz2: false # IMPORTANT: This may break caching of conda packages! See https://github.com/conda-incubator/setup-miniconda/issues/267
- name: Install current branch
run: |
conda activate pymc-statespace
pip install -e .
python --version
- name: Run tests
run: |
python -m pytest -vv --cov=pymc_statespace --cov-report=xml --no-cov-on-fail --cov-report term $TEST_SUBSET
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # use token for more robust uploads
env_vars: TEST_SUBSET
name: ${{ matrix.os }}
fail_ci_if_error: false
verbose: true