Skip to content

Add variance-budget and scale-invariant fit training diagnostics #90

Add variance-budget and scale-invariant fit training diagnostics

Add variance-budget and scale-invariant fit training diagnostics #90

Workflow file for this run

name: pytest
on:
pull_request:
push:
branches: [main]
paths:
- ".github/workflows/*"
- "ptgp/**"
- "tests/**"
- "pyproject.toml"
- "conda_envs/**"
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
style:
name: Run Pre-Commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-python@v5
with:
python-version: "3.13"
# no-commit-to-branch would fail on direct pushes to main since HEAD is
# main. CI isn't committing, just linting, so skip it.
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
env:
SKIP: no-commit-to-branch
test:
name: ${{ matrix.name }}
needs: style
if: ${{ needs.style.result == 'success' }}
strategy:
matrix:
include:
- name: ubuntu / py3.13
os: ubuntu-latest
python-version: "3.13"
shell: bash -leo pipefail {0}
- name: windows / py3.12
os: windows-latest
python-version: "3.12"
shell: cmd /C call {0}
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7
with:
environment-file: conda_envs/environment-test.yaml
create-args: >-
python=${{ matrix.python-version }}
environment-name: ptgp-test
init-shell: ${{ matrix.os == 'windows-latest' && 'cmd.exe' || 'bash' }}
cache-environment: true
post-cleanup: none
- name: Install ptgp
run: |
pip install -e . --no-deps
python --version
- name: Run tests
run: |
python -m pytest --color=yes -vv --durations=50 tests/