Skip to content

Merge branch 'main' into cfe_classes_ #15

Merge branch 'main' into cfe_classes_

Merge branch 'main' into cfe_classes_ #15

Workflow file for this run

name: CI
on: [push]
# Automatically stop old builds on the same branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -el {0}
jobs:
pre-commit-checks:
name: Pre-commit Checks
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
# needed for 'pre-commit-mirrors-insert-license'
fetch-depth: 0
- name: Run pre-commit-conda
uses: quantco/pre-commit-conda@v1
mypy-type-checks:
name: Mypy Type Checks
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Conda env
uses: mamba-org/setup-micromamba@422500192359a097648154e8db4e39bdb6c6eed7
with:
condarc-file: .github/assets/.condarc
environment-file: environment.yml
cache-environment: true
- name: Install repository
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
- name: Run mypy
run: mypy .
unit-tests:
name: Unit Tests - ${{ matrix.os == 'ubuntu-latest-8core' && 'Linux' || 'Windows' }} - Python ${{ matrix.python-version }}
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest-8core]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Set up Conda env
uses: mamba-org/setup-micromamba@422500192359a097648154e8db4e39bdb6c6eed7
with:
condarc-file: .github/assets/.condarc
environment-file: environment.yml
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
pytest-md
pytest-emoji
- name: Install repository
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
- name: Run unittests
uses: quantco/pytest-action@v2
with:
report-title: Unit Tests - ${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Windows' }} - Python ${{ matrix.python-version }}
custom-arguments: --cov=metalearners --cov-report=xml --cov-report term-missing --color=yes