PR: Add backend for Pixi #184
Workflow file for this run
This file contains hidden or 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
| # Run the project's test suite | |
| name: Windows tests | |
| on: [pull_request, push] | |
| concurrency: | |
| group: windows-tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| name: Test Python ${{ matrix.python-version }} Executable ${{ matrix.conda-like }} | |
| runs-on: windows-latest | |
| timeout-minutes: 25 | |
| env: | |
| PYTHON_VERSION: ${{ matrix.python-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.9', '3.11'] | |
| conda-like: ['micromamba', 'conda'] | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@v4 | |
| - name: Install Conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| channels: conda-forge | |
| python-version: ${{ matrix.python-version }} | |
| environment-file: requirements/environment.yml | |
| auto-activate-base: false | |
| - name: Install Micromamba and setup as executable backend | |
| if: ${{matrix.conda-like == 'micromamba'}} | |
| shell: bash -l {0} | |
| run: | | |
| mkdir micromamba | |
| curl -Ls https://micro.mamba.pm/api/micromamba/win-64/1.5.10 | tar -xvj -C micromamba | |
| echo "ENV_BACKEND_EXECUTABLE=${{ github.workspace }}\micromamba\Library\bin\micromamba.exe" >> $GITHUB_ENV | |
| echo "MAMBA_ROOT_PREFIX=${{ github.workspace }}\micromamba" >> $GITHUB_ENV | |
| - name: Setup executable backend with conda | |
| if: ${{matrix.conda-like == 'conda'}} | |
| shell: bash -l {0} | |
| run: | | |
| echo "ENV_BACKEND_EXECUTABLE=$CONDA/condabin/conda.bat" >> $GITHUB_ENV | |
| - name: Install Pixi and setup as executable backend | |
| if: ${{matrix.conda-like == 'pixi'}} | |
| shell: bash -l {0} | |
| run: | | |
| curl -fsSL https://pixi.sh/install.sh | sh | |
| echo "ENV_BACKEND_EXECUTABLE=~/.pixi/bin/pixi" >> $GITHUB_ENV | |
| - name: Install envs-manager | |
| shell: bash -l {0} | |
| run: | | |
| pip install -e . | |
| - name: Run tests | |
| shell: bash -l {0} | |
| run: | | |
| pytest --cov-report xml --cov=envs_manager --color=yes -vv -x | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| verbose: true |