-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some initial downstream tests and apply suggestions
- Loading branch information
Showing
3 changed files
with
116 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,3 +203,71 @@ jobs: | |
run: ${{ env.TARGET_RELEASE }}/pixi${{ matrix.arch.extension }} run typecheck-integration | ||
- name: Run integration tests | ||
run: ${{ env.TARGET_RELEASE }}/pixi${{ matrix.arch.extension }} run test-integration-ci | ||
|
||
test-export: | ||
name: ${{ matrix.arch.name }} - Export Tests | ||
runs-on: ${{ matrix.arch.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: | ||
# Linux | ||
- { | ||
target: x86_64-unknown-linux-musl, | ||
os: ubuntu-20.04, | ||
name: "Linux", | ||
} | ||
# MacOS | ||
- { target: x86_64-apple-darwin, os: macos-13, name: "MacOS-x86" } | ||
- { target: aarch64-apple-darwin, os: macos-14, name: "MacOS-arm" } # macOS-14 is the ARM chipset | ||
# Windows | ||
- { | ||
target: x86_64-pc-windows-msvc, | ||
os: windows-latest, | ||
extension: .exe, | ||
name: "Windows", | ||
} | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
- name: setup micromamba | ||
uses: mamba-org/[email protected] | ||
- name: Download binary from build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: pixi-${{ matrix.arch.target }}${{ matrix.arch.extension }} | ||
path: pixi_bin | ||
- name: Debug | ||
run: | | ||
pwd | ||
- name: Setup unix binary, add to github path | ||
if: matrix.arch.name != 'Windows' | ||
run: | | ||
mv pixi_bin/pixi-${{ matrix.arch.target }} pixi_bin/pixi | ||
chmod a+x pixi_bin/pixi | ||
echo "$(pwd)/pixi_bin" >> $GITHUB_PATH | ||
- name: Create Directory and Move Executable | ||
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc' | ||
run: | | ||
New-Item -ItemType Directory -Force -Path "D:\.pixi" | ||
Move-Item -Path "pixi_bin/pixi-${{ matrix.arch.target }}${{ matrix.arch.extension }}" -Destination "D:\.pixi\pixi.exe" | ||
shell: pwsh | ||
- name: Add to PATH | ||
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc' | ||
run: echo "D:\.pixi" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_PATH | ||
shell: pwsh | ||
- name: Verify and Use Executable | ||
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc' | ||
run: | | ||
echo "Current PATH: $env:PATH" | ||
pixi --version | ||
shell: pwsh | ||
- name: Help | ||
run: pixi --help | ||
- name: Info | ||
run: pixi info | ||
- name: Install pixi | ||
run: pixi install -v | ||
- name: Test export | ||
shell: bash | ||
run: bash tests/test_export.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Run from the root of the project using `bash tests/test_export.sh` | ||
set -e | ||
echo "Running test_export.sh" | ||
|
||
echo "Exporting the export test environment" | ||
pixi project export conda-environment --manifest-path src/cli/project/export/test-data/testenv/pixi.toml | tee test-env.yml | ||
echo "Creating the export test environment with micromamba" | ||
micromamba create -y -f test-env.yml -n export-test | ||
micromamba env list | ||
micromamba env remove -y -n export-test | ||
|
||
echo "Exporting an environment.yml with pip extras" | ||
pixi project export conda-environment --manifest-path examples/pypi/pixi.toml | tee test-env-pip-extras.yml | ||
echo "Creating the pip extra test environment with micromamba" | ||
micromamba create -y -f test-env-pip-extras.yml -n export-test-pip-extras | ||
micromamba env list | ||
micromamba env remove -y -n export-test-pip-extras | ||
|
||
echo "Export an environment.yml with editable source dependencies" | ||
pixi project export conda-environment --manifest-path examples/pypi-source-deps/pixi.toml | tee test-env-source-deps.yml | ||
echo "Creating the editable source dependencies test environment with micromamba" | ||
micromamba create -y -f test-env-source-deps.yml -n export-test-source-deps | ||
micromamba env list | ||
micromamba env remove -y -n export-test-source-deps | ||
|
||
echo "Export an environment.yml with custom pip registry" | ||
pixi project export conda-environment --manifest-path examples/pypi-custom-registry/pixi.toml | tee test-env-custom-registry.yml | ||
echo "Creating the custom pip registry test environment with micromamba" | ||
micromamba create -y -f test-env-custom-registry.yml -n export-test-custom-registry | ||
micromamba env list | ||
micromamba env remove -y -n export-test-custom-registry | ||
|
||
echo "Export an environment.yml with pip find links" | ||
pixi project export conda-environment --manifest-path examples/pypi-find-links/pixi.toml | tee test-env-find-links.yml | ||
echo "Creating the pip find links test environment with micromamba" | ||
micromamba create -y -f test-env-find-links.yml -n export-test-find-links | ||
micromamba env list | ||
micromamba env remove -y -n export-test-find-links | ||
|
||
echo "Export an environment.yml from a pyproject.toml that has caused panics" | ||
pixi project export conda-environment --manifest-path examples/docker/pyproject.toml | tee test-env-pyproject-panic.yml | ||
echo "Creating the pyproject.toml panic test environment with micromamba" | ||
micromamba create -y -f test-env-pyproject-panic.yml -n export-test-pyproject-panic | ||
micromamba env list | ||
micromamba env remove -y -n export-test-pyproject-panic |