Skip to content

Port project to pixi and QuantCo OSS copier template #1603

Port project to pixi and QuantCo OSS copier template

Port project to pixi and QuantCo OSS copier template #1603

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- "main"
- "pre-commit-autoupdate"
- "update-pixi"
tags:
- "*"
schedule:
# daily (`@daily` not supported, see
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events )
#
# Runs on default/base branch (see
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule )
- cron: "0 0 * * *"
jobs:
pre-commit:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
with:
environments: default lint
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
tests:
strategy:
fail-fast: false
matrix:
include:
# py310
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py310--pyarrow4-0-1"
- numfocus_nightly: false
pyarrow_nightly: true
environment: "py310--pyarrow-nightly"
- numfocus_nightly: true
pyarrow_nightly: true
environment: "py310--pyarrow-nightly"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py310--pyarrow7-0"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py310--pyarrow8-0-1"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py310--pyarrow9-0"
# py311
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py311--pyarrow10-0-1"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py311--pyarrow11-0"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py311--pyarrow12-0"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py311--pyarrow13-0"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py311--pyarrow13-0--pandas1-5-3"
# py312
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py312--pyarrow13-0"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py312--pyarrow14-0-1"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py312--pyarrow15-0"
- numfocus_nightly: false
pyarrow_nightly: false
environment: "py312--pyarrow18-1"
continue-on-error: ${{ matrix.numfocus_nightly || matrix.pyarrow_nightly }}
runs-on: "ubuntu-latest"
defaults:
run:
# see https://github.com/conda-incubator/setup-miniconda/#important
shell: bash -l {0}
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up pixi
uses: prefix-dev/setup-pixi@ba3bb36eb2066252b2363392b7739741bb777659 # v0.8.1
with:
environments: ${{ matrix.environment }} # References the environments defined in pixi.toml
- name: Install Pyarrow (nightly)
# The nightlies channel for conda is currently empty: https://github.com/apache/arrow/issues/41856
# We therefore rely on the pip nightlies: https://github.com/data-engineering-collective/plateau/pull/184#discussion_r1888429974
run: pixi run pip install --extra-index-url https://pypi.fury.io/arrow-nightlies/ --prefer-binary --pre pyarrow
if: matrix.pyarrow_nightly
- name: Pip Install NumFOCUS nightly
# NumFOCUS nightly wheels, contains numpy and pandas
# TODO(gh-45): Re-add numpy
run: pixi run python -m pip install --pre --upgrade --timeout=60 --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/ pandas
if: matrix.numfocus_nightly
- name: Install repository
run: pixi run postinstall
- name: Pytest
run: pixi run test-coverage -n auto
- name: Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
name: pytest-numfocus_nightly_${{ matrix.numfocus_nightly }}-os_${{ matrix.os }}-pyarrow_${{ matrix.pyarrow }}-${{ matrix.python }}