Skip to content

Update for new python, pandas, and sklearn versions #130

Update for new python, pandas, and sklearn versions

Update for new python, pandas, and sklearn versions #130

Workflow file for this run

# This workflow will setup conda environment, lint the code, run test suite, ensure docs can be built and upload code coverage
# Extracted from https://gist.github.com/mwouts/9842452d020c08faf9e84a3bba38a66f
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v1
with:
path: ~/conda_pkgs_dir
key: conda-${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('environment.yml') }}
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: hcrystalball
channels: conda-forge
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
use-only-tar-bz2: true
- name: Lint with flake8
shell: pwsh
run: flake8 .
- name: Install from source
# This is required for the pre-commit tests
shell: pwsh
run: pip install .
- name: Conda list
shell: pwsh
run: conda list
- name: Test with pytest
shell: pwsh
run: |
if("${{ matrix.os }}" -eq "windows-latest"){
pytest --no-cov
} else {
pytest --cov=./ --cov-report=xml
}
- name: Build docs
shell: pwsh
run: python setup.py build_sphinx
if: ${{ matrix.os != 'windows-latest'}}
- name: Upload coverage
uses: codecov/codecov-action@v1
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version=='3.8'}}