Skip to content

Commit

Permalink
ci: Test against multiple Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian committed Jul 18, 2024
1 parent 3289685 commit 49baed5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 28 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/build.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# name: Run updater that will check for conda-forge packages

on:
push:
branches: [ "main" ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run_tests:
name: ${{ matrix.pixi-environment }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pixi-environment:
- py312
- py311
- py310
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.5.1
with:
pixi-version: "latest"
environments: ${{ matrix.pixi-environment }}
- name: run tests
run: |
pixi run --environment ${{ matrix.pixi-environment }} test
19 changes: 13 additions & 6 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]

[tasks]

build_sdist = "pixi run python -m build --sdist"

[dependencies]
Expand All @@ -24,16 +23,14 @@ typing-extensions = ">=4.12.2,<4.13"
[pypi-dependencies]
rattler-build-conda-compat = { path = ".", editable = true}


[feature.test.dependencies]
pytest = "*"
syrupy = "*"
ruff = "*"

[feature.test.tasks]
test = "pytest"
snapshot_update = "pytest --snapshot-update"

test = "pytest tests"
snapshot_update = "pytest --snapshot-update tests"

[feature.lint.dependencies]
pre-commit = ">=3.7.1,<4"
Expand All @@ -48,7 +45,17 @@ pre-commit-install = "pre-commit-install"
pre-commit-run = "pre-commit run"
type-check = "mypy src"

[feature.py312.dependencies]
python = "3.12.*"

[feature.py311.dependencies]
python = "3.11.*"

[feature.py310.dependencies]
python = "3.10.*"

[environments]
test = ["test"]
py312 = { features = ["py312"], solve-group = "py312" }
py311 = ["py311"]
py310 = ["py310"]
lint = { features = ["lint"], no-default-feature = true, solve-group = "default" }

0 comments on commit 49baed5

Please sign in to comment.