Skip to content

Implement sample_weight instead of silently ignoring it #90

Implement sample_weight instead of silently ignoring it

Implement sample_weight instead of silently ignoring it #90

Workflow file for this run

name: Tests
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,excel,reports,cli]"
- name: Run tests with coverage
run: |
pytest tests/ -v --tb=short --timeout=60 --cov=jaxsr --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: false
# The browser app runs jaxsr on a NumPy stand-in for JAX, because jaxlib has
# no WebAssembly build. This runs the whole suite through that stand-in, so a
# library change that only breaks the browser path is caught here.
numpy-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,excel,reports,cli]"
- name: Run the test suite on the NumPy backend
run: |
python scripts/test_under_numpy.py tests/ -v --tb=short --timeout=60
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff black
- name: Check formatting with black
run: |
black --check src/ tests/
- name: Lint with ruff
run: |
ruff check src/ tests/