Skip to content

Commit

Permalink
Switch to multi environment pixi configuration (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Feb 1, 2024
1 parent 484d685 commit cb9bd2a
Show file tree
Hide file tree
Showing 4 changed files with 7,229 additions and 33 deletions.
41 changes: 19 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,37 @@ concurrency:

jobs:
tests:
name: ${{ matrix.PYTHON_VERSION }} ${{ matrix.POLARS_VERSION }}
name: Unit tests
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { PYTHON_VERSION: 'python=3.9', POLARS_VERSION: 'polars=0.14.28' }
- { PYTHON_VERSION: 'python=3.9', POLARS_VERSION: 'polars=0.15' }
- { PYTHON_VERSION: 'python=3.9', POLARS_VERSION: 'polars=0.16' }
- { PYTHON_VERSION: 'python=3.9', POLARS_VERSION: 'polars=0.17' }
- { PYTHON_VERSION: 'python=3.9', POLARS_VERSION: 'polars=0.18' }
- { PYTHON_VERSION: 'python=3.9', POLARS_VERSION: 'polars=0.19' }
- { PYTHON_VERSION: 'python=3.9', POLARS_VERSION: 'polars=0.20' }
- { PYTHON_VERSION: 'python=3.10', POLARS_VERSION: '' }
- { PYTHON_VERSION: 'python=3.11', POLARS_VERSION: '' }
- { PYTHON_VERSION: 'python=3.12', POLARS_VERSION: '' }
env:
- pl014
- pl015
- pl016
- pl017
- pl018
- pl019
- pl020
- py39
- py310
- py311
- py312
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.4.3
- uses: prefix-dev/setup-pixi@c2a7a2709894350902c4ef78eb3c38f5ae15c7f4
with:
run-install: false
- name: Install dependencies
# TODO: make prettier once there are feature flags
# https://github.com/prefix-dev/pixi/issues/239
environments: ${{ matrix.env }}
- name: Install repository
run: |
pixi add ${{ matrix.PYTHON_VERSION }} ${{ matrix.POLARS_VERSION }}
pixi install
pixi run postinstall
pixi run -e ${{ matrix.env }} postinstall
- name: Run unittests
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507
with:
custom-pytest: pixi run pytest
report-title: ${{ matrix.PYTHON_VERSION }} ${{ matrix.POLARS_VERSION }}
custom-pytest: pixi run -e ${{ matrix.env }} pytest
report-title: ${{ matrix.env }}

pre-commit-checks:
# TODO: switch to pixi once there is a good way
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Explicitly unignore hidden files (except for .git/) for ripgrep. Individual folders can still
# Explicitly unignore hidden files for ripgrep. Individual folders can still
# be ignored in the blocks below.
!.*
.git/

# NOTE: The block below is NOT copied sic from https://www.toptal.com/developers/gitignore.
# Instead, it contains some customizations that should be taken into account when adjusting the
Expand Down Expand Up @@ -259,7 +258,6 @@ ipython_config.py
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
.pixi
pixi.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
Expand Down
Loading

0 comments on commit cb9bd2a

Please sign in to comment.