Refactor alpha_recover and inverse_hessian_factors to remove update_m… #1694
Workflow file for this run
This file contains hidden or 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: | |
pull_request: | |
push: | |
branches: [main] | |
paths: | |
- ".github/workflows/*" | |
- "pymc_extras/**" | |
- "tests/**" | |
- "setup.py" | |
- "pyproject.toml" | |
- "buildosx" | |
- "conda-envs/**" | |
- "codecov.yml" | |
jobs: | |
ubuntu: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
test-subset: | |
- tests | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
TEST_SUBSET: ${{ matrix.test-subset }} | |
PYTENSOR_FLAGS: gcc__cxxflags='-march=native' | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: conda-envs/environment-test.yml | |
create-args: >- | |
python=${{matrix.python-version}} | |
environment-name: pymc-extras-test | |
init-shell: bash | |
cache-environment: true | |
- name: Install pymc-extras | |
run: | | |
pip install -e . | |
python --version | |
- name: Run tests | |
run: | | |
python -m pytest -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 $TEST_SUBSET | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
env_vars: TEST_SUBSET | |
name: ${{ matrix.os }} | |
fail_ci_if_error: false | |
windows: | |
strategy: | |
matrix: | |
os: [windows-latest] | |
python-version: ["3.12"] | |
test-subset: | |
- tests | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
TEST_SUBSET: ${{ matrix.test-subset }} | |
PYTENSOR_FLAGS: gcc__cxxflags='-march=core2' | |
defaults: | |
run: | |
shell: cmd /C call {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: conda-envs/windows-environment-test.yml | |
micromamba-version: "1.5.10-0" # Until https://github.com/mamba-org/mamba/issues/3467 is not fixed | |
create-args: >- | |
python=${{matrix.python-version}} | |
environment-name: pymc-extras-test | |
init-shell: cmd.exe | |
cache-environment: true | |
- name: Install pymc-extras | |
run: | | |
pip install -e . | |
python --version | |
- name: Run tests | |
# This job uses a cmd shell, therefore the environment variable syntax is different! | |
# The ">-" in the next line replaces newlines with spaces (see https://stackoverflow.com/a/66809682). | |
run: >- | |
python -m pytest -vv --cov=pymc_extras --cov-append --cov-report=xml --cov-report term --durations=50 %TEST_SUBSET% | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
env_vars: TEST_SUBSET | |
name: ${{ matrix.os }} | |
fail_ci_if_error: false |