Skip to content

CI

CI #1523

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
unit:
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: latest
activate-environment: conda-env
channels: conda-forge, defaults
python-version: ${{ matrix.python-version }}
- name: Lint
shell: bash -l {0}
run: |
eval "$(conda shell.bash hook)"
pip install pkgmt
pkgmt lint
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLOOMBER_STATS_ENABLED: false
PYTHON_VERSION: ${{ matrix.python-version }}
shell: bash -l {0}
run: |
eval "$(conda shell.bash hook)"
# if we remove the --editable flag pytest throws an error, because there
# are two copies of the pkg (src/ and site-packages/), this is a quick
# way to fix it
# https://github.com/pytest-dev/pytest/issues/7678
pip install --editable .
python -c "import sklearn_evaluation"
pip install --editable ".[dev]"
pytest tests/ src/ --cov=sklearn_evaluation --doctest-modules --durations-min=5
coveralls
# run: pkgmt check
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install 'pkgmt[check]'
- name: Check project
run: |
pkgmt check