Skip to content

Pre-commit autoupdate #357

Pre-commit autoupdate

Pre-commit autoupdate #357

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -el {0}
jobs:
linux-unittests:
name: >-
Unit tests - Python ${{ matrix.PYTHON_VERSION }}
${{ matrix.SKLEARN_VERSION }}${{ matrix.LGBM_VERSION }}
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { PYTHON_VERSION: '3.8', SKLEARN_VERSION: 'scikit-learn=1.1', LGBM_VERSION: '' }
- { PYTHON_VERSION: '3.8', SKLEARN_VERSION: 'scikit-learn=1.2', LGBM_VERSION: '' }
- { PYTHON_VERSION: '3.8', SKLEARN_VERSION: 'scikit-learn=1.3', LGBM_VERSION: '' }
- { PYTHON_VERSION: '3.8', SKLEARN_VERSION: '', LGBM_VERSION: 'lightgbm=3.2' }
- { PYTHON_VERSION: '3.8', SKLEARN_VERSION: '', LGBM_VERSION: 'lightgbm=3.3' }
- { PYTHON_VERSION: '3.8', SKLEARN_VERSION: '', LGBM_VERSION: 'lightgbm=4.0' }
- { PYTHON_VERSION: '3.8', SKLEARN_VERSION: '', LGBM_VERSION: 'lightgbm=4.1' }
- { PYTHON_VERSION: '3.8', SKLEARN_VERSION: '', LGBM_VERSION: '' }
- { PYTHON_VERSION: '3.9', SKLEARN_VERSION: '', LGBM_VERSION: '' }
- { PYTHON_VERSION: '3.10', SKLEARN_VERSION: '', LGBM_VERSION: '' }
- { PYTHON_VERSION: '3.11', SKLEARN_VERSION: '', LGBM_VERSION: '' }
- { PYTHON_VERSION: '3.12', SKLEARN_VERSION: '', LGBM_VERSION: '' }
steps:
- uses: actions/checkout@v4
- name: Set up conda env
uses: mamba-org/setup-micromamba@v1
with:
cache-environment: true
environment-file: environment-deprecated.yml
create-args: >-
python=${{ matrix.PYTHON_VERSION }}
pytest-md
pytest-emoji
${{ matrix.SKLEARN_VERSION }}${{ matrix.LGBM_VERSION }}
- name: Install repository
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
- name: Run unittests
uses: pavelzw/pytest-action@v2
with:
custom-arguments: ${{ matrix.SKLEARN_VERSION != '' && '-k sklearn' || '' }}${{ matrix.LGBM_VERSION != '' && ' -k lgbm' || '' }}
report-title: >-
Unit tests - Python ${{ matrix.PYTHON_VERSION }}
${{ matrix.SKLEARN_VERSION }}${{ matrix.LGBM_VERSION }}
linux-unittests-pixi:
name: Unit tests Pixi
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
- name: Install environment
run: |
pixi run postinstall
- name: Run unittests
uses: pavelzw/pytest-action@v2
with:
custom-pytest: pixi run test
report-title: Unit tests Linux Pixi
pre-commit: # todo switch to pre-commit.ci
name: "Pre-commit checks"
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Install Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Run pre-commit checks
uses: pre-commit/[email protected]
lint-workflow-files:
name: "Lint workflow files"
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
# https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color