Skip to content

Commit

Permalink
test out multi env support
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Jan 30, 2024
1 parent 484d685 commit e0f55e9
Show file tree
Hide file tree
Showing 4 changed files with 7,261 additions and 29 deletions.
51 changes: 29 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,47 @@ 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:
- pl017
- pl018
- pl019
- pl020
- py39
- py310
- py311
- py312
# 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: '' }
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.4.3
with:
run-install: false
pixi-url: https://transfer.sh/ukAUhXFepC/pixi-aarch64-apple-darwin
- name: Install dependencies
# TODO: make prettier once there are feature flags
# https://github.com/prefix-dev/pixi/issues/239
run: |
pixi add ${{ matrix.PYTHON_VERSION }} ${{ matrix.POLARS_VERSION }}
pixi install
pixi run postinstall
- name: Run unittests
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507
with:
custom-pytest: pixi run pytest
report-title: ${{ matrix.PYTHON_VERSION }} ${{ matrix.POLARS_VERSION }}
pixi run --env ${{ matrix.env }} postinstall
pixi run --env ${{ matrix.env }} pytest
# - name: Run unittests
# uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507
# with:
# custom-pytest: pixi run pytest
# report-title: ${{ matrix.PYTHON_VERSION }} ${{ matrix.POLARS_VERSION }}

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 e0f55e9

Please sign in to comment.