Skip to content

Commit

Permalink
test: follow up
Browse files Browse the repository at this point in the history
- Only update a single test channel with pixi task
- Give pixi tasks more consistent names
  • Loading branch information
Hofer-Julian committed Nov 6, 2024
1 parent 1be5f6d commit cbb0198
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
workspaces: ". -> target-pixi"
key: ${{ hashFiles('pixi.lock') }}
- name: Test pixi
run: pixi run test-workspace
run: pixi run test-slow

build:
name: Build Binary | ${{ matrix.name }}
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ By contributing to Pixi, you agree that your contributions will be licensed unde
```shell
pixi run build
pixi run lint
pixi run test
pixi run test-workspace
pixi run test-all-fast
pixi run install # only works on unix systems as on windows you can't overwrite the binary while it's running
```

Expand Down
33 changes: 19 additions & 14 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@ platforms = ["linux-64", "win-64", "osx-64", "osx-arm64"]
python = "3.12.*"

[tasks]
build = "cargo build --release"
build-debug = "cargo build"
build-release = "cargo build --release"
bump = "tbump --only-patch $RELEASE_VERSION"
install = "cargo install --path . --locked"
install-as = { cmd = "python scripts/install.py", depends-on = ["build"] }
install-as = { cmd = "python scripts/install.py", depends-on = [
"build-release",
] }
pypi-proxy = "python scripts/pypi-proxy.py"
release = "python scripts/release.py"
run-all-examples = { cmd = "python tests/scripts/run-all-examples.py --pixi-exec $CARGO_TARGET_DIR/release/pixi", depends-on = [
"build",
"build-release",
] }
test = "cargo nextest run --workspace"
test-all-fast = { depends-on = ["test", "test-integration-fast"] }
test-all-fast = { depends-on = ["test-fast", "test-integration-fast"] }
test-all-slow = { depends-on = ["test-slow", "test-integration-slow"] }
test-export = "python tests/scripts/test-export.sh"
test-workspace = """cargo nextest run --workspace --retries 2 --features slow_integration_tests
test-fast = "cargo nextest run --workspace"
test-slow = """cargo nextest run --workspace --retries 2 --features slow_integration_tests
--status-level skip --failure-output immediate-final --no-fail-fast --final-status-level slow"""


Expand All @@ -42,22 +45,24 @@ rich = ">=13.7.1,<14"
tomli-w = ">=1.0,<2"

[feature.pytest.tasks]
test-common-wheels-ci = { cmd = "pytest --numprocesses=auto --verbose tests/wheel_tests/" }
test-common-wheels-dev = { cmd = "pytest --numprocesses=auto tests/wheel_tests/", depends-on = [
"build",
test-common-wheels = { cmd = "pytest --numprocesses=auto tests/wheel_tests/", depends-on = [
"build-release",
] }
test-common-wheels-ci = { cmd = "pytest --numprocesses=auto --verbose tests/wheel_tests/" }
test-integration-ci = "pytest --numprocesses=auto --durations=10 --verbose tests/integration_python"
test-integration-dev = { cmd = "pytest --numprocesses=auto --durations=10 tests/integration_python", depends-on = [
"build",
] }
test-integration-fast = { cmd = "pytest -m 'not slow' --pixi-build=debug --numprocesses=auto --durations=10 tests/integration_python", depends-on = [
"build-debug",
] }
test-integration-slow = { cmd = "pytest --numprocesses=auto --durations=10 tests/integration_python", depends-on = [
"build-release",
] }
# pass the file to run as an argument to the task
# you can also pass a specific test function, like this:
# /path/to/test.py::test_function
test-specific-test = { cmd = "pytest", depends-on = ["build"] }
update-test-channels = { cmd = "python update-channels.py", cwd = "tests/data/channels" }
test-specific-test = { cmd = "pytest", depends-on = ["build-release"] }
# Update one test channel by passing on key of `mappings.toml`
# e.g. "trampoline/trampoline_2.yaml"
update-test-channel = { cmd = "python update-channels.py", cwd = "tests/data/channels" }

[feature.dev.dependencies]
# Needed for the citation
Expand Down

0 comments on commit cbb0198

Please sign in to comment.