Skip to content

Transfer new Pelt tests and mean_cov_cost to use soft imported numba.… #483

Transfer new Pelt tests and mean_cov_cost to use soft imported numba.…

Transfer new Pelt tests and mean_cov_cost to use soft imported numba.… #483

Workflow file for this run

name: tests
on: [push, pull_request]
jobs:
code-quality:
name: code-quality
runs-on: ubuntu-latest
steps:
- name: repository checkout step
uses: actions/checkout@v4
- name: python environment step
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: install pre-commit
run: python3 -m pip install pre-commit
- id: changed-files
name: identify modified files
uses: tj-actions/changed-files@v45
- name: run pre-commit hooks on modified files
run: pre-commit run --color always --files ${{ steps.changed-files.outputs.all_changed_files }} --show-diff-on-failure
- name: check missing __init__ files
run: build_tools/fail_on_missing_init_files.sh
shell: bash
pytests:
name: Run pytests with and without Numba
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install Python dependencies - without Numba
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
python -m pip install pytest
- name: Run pytest - without Numba installed
run: |
pytest --cov --cov-report=xml
- name: Install Skchange + Numba
run: |
python -m pip install .[dev,numba]
# Uncomment these lines if you want to disable numba JIT:
# - name: Disable numba JIT
# run: |
# echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV
- name: Run pytest - with Numba installed
run: |
pytest --cov --cov-report=xml --cov-append
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}