Convert item to list. #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
strategy: | |
matrix: | |
env: [py312] | |
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: Set up pixi env | |
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 | |
with: | |
environments: ${{ matrix.env }} | |
- name: Install repository | |
run: | | |
pixi run -e ${{ matrix.env }} postinstall | |
- name: Run mypy | |
run: pixi 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] | |
env: ["py310", "py311", "py312"] | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Set up pixi env | |
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 | |
with: | |
environments: ${{ matrix.env }} | |
- name: Install repository | |
run: | | |
pixi run -e ${{ matrix.env }} postinstall | |
- name: Run unittests | |
uses: quantco/pytest-action@v2 | |
with: | |
custom-pytest: pixi run -e ${{ matrix.env }} coverage | |
report-title: Unit Tests - ${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Windows' }} - ${{ matrix.env }} | |
custom-arguments: --cov=metalearners --cov-report=xml --cov-report term-missing --color=yes |