Skip to content

Feature selection - Recommended workflow #169

Feature selection - Recommended workflow

Feature selection - Recommended workflow #169

Workflow file for this run

name: Run tests
on:
pull_request:
push:
branches:
- main
- trunk
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
hisel_tests:
name: "hisel tests"
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Lint with flake8
run: |
python3 -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --ignore=W504,W503,W605,E741,E226 --max-complexity=32 --max-line-length=127 --statistics
- name: Installing hisel dependencies
run: |
python3 -m pip install --upgrade pip wheel setuptools virtualenv
virtualenv hisel-env
source hisel-env/bin/activate
python3 -m pip install poetry
python3 -m pip install pytest
poetry lock
poetry install
- name: Run hisel tests
run: |
source hisel-env/bin/activate
poetry run pytest tests/kernel_test.py --disable-warnings
poetry run pytest tests/lar_test.py --disable-warnings
poetry run pytest tests/select_test.py --disable-warnings
poetry run pytest tests/hsic_test.py --disable-warnings
poetry run pytest tests/categorical_test.py --disable-warnings
poetry run pytest tests/feature_selection_test.py --disable-warnings