mirror of
https://github.com/prefix-dev/setup-pixi
synced 2026-10-08 15:04:08 +03:00
Compare commits
5
Commits
v0.4.1
..
debug-test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3e865a194 | ||
|
|
5b18bdc1e0 | ||
|
|
907eb83951 | ||
|
|
2023b09192 | ||
|
|
4bb84de5dd |
@@ -32,3 +32,19 @@ jobs:
|
||||
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
|
||||
reference-latest-version-in-readme:
|
||||
name: Reference latest version in README
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Assert latest setup-pixi version is mentioned in README
|
||||
run: |
|
||||
latest_version="$(jq -r '.version' package.json)"
|
||||
count_expected=10
|
||||
count_actual="$(grep -c "setup-pixi@v$latest_version" README.md || true)"
|
||||
if [ "$count_actual" -ne "$count_expected" ]; then
|
||||
echo "::error file=README.md::Expected $count_expected mentions of setup-pixi@v$latest_version in README.md, but found $count_actual."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -390,6 +390,21 @@ jobs:
|
||||
pixi run python --version | grep -q 3.11
|
||||
pixi run test | grep -q "Hello world"
|
||||
|
||||
debug:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi.toml
|
||||
run: mv test/default/* .
|
||||
# test that setup-pixi does debug logging
|
||||
- uses: ./
|
||||
env:
|
||||
ACTIONS_STEP_DEBUG: true
|
||||
- run: pixi run python --version | grep -q 3.11
|
||||
|
||||
test-cache1:
|
||||
name: Test cache 1/2
|
||||
timeout-minutes: 10
|
||||
|
||||
@@ -23,9 +23,9 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
with:
|
||||
pixi-version: v0.5.0
|
||||
pixi-version: v0.7.0
|
||||
cache: true
|
||||
auth-host: prefix.dev
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
@@ -34,7 +34,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
|
||||
|
||||
> [!WARNING]
|
||||
> Since pixi is not yet stable, the API of this action may change between minor versions.
|
||||
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.3.0`) to avoid breaking changes.
|
||||
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.4.1`) to avoid breaking changes.
|
||||
> You can automatically update the version of this action by using [Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot).
|
||||
|
||||
## Features
|
||||
@@ -52,6 +52,18 @@ You can specify the behavior by setting the `cache` input argument.
|
||||
If you need to customize your cache-key, you can use the `cache-key` input argument.
|
||||
This will be the prefix of the cache key. The full cache key will be `<cache-key><conda-arch>-<hash>`.
|
||||
|
||||
#### Only save caches on `main`
|
||||
|
||||
In order to not exceed the [10 GB cache size limit](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy) as fast, you might want to restrict when the cache is saved.
|
||||
This can be done by setting the `cache-write` argument.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
with:
|
||||
cache: true
|
||||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
|
||||
```
|
||||
|
||||
### Authentication
|
||||
|
||||
There are currently three ways to authenticate with pixi:
|
||||
@@ -73,7 +85,7 @@ Specify the token using the `auth-token` input argument.
|
||||
This form of authentication (bearer token in the request headers) is mainly used at [prefix.dev](https://prefix.dev).
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
with:
|
||||
auth-host: prefix.dev
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
@@ -85,7 +97,7 @@ Specify the username and password using the `auth-username` and `auth-password`
|
||||
This form of authentication (HTTP Basic Auth) is used in some enterprise environments with [artifactory](https://jfrog.com/artifactory) for example.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
with:
|
||||
auth-host: custom-artifactory.com
|
||||
auth-username: ${{ secrets.PIXI_USERNAME }}
|
||||
@@ -98,7 +110,7 @@ Specify the conda-token using the `conda-token` input argument.
|
||||
This form of authentication (token is encoded in URL: `https://my-quetz-instance.com/t/<token>/get/custom-channel`) is used at [anaconda.org](https://anaconda.org) or with [quetz instances](https://github.com/mamba-org/quetz).
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
with:
|
||||
auth-host: anaconda.org # or my-quetz-instance.com
|
||||
conda-token: ${{ secrets.CONDA_TOKEN }}
|
||||
@@ -136,7 +148,7 @@ You can specify whether `setup-pixi` should run `pixi install --frozen` or `pixi
|
||||
See the [official documentation](https://prefix.dev/docs/pixi/cli#install) for more information about the `--frozen` and `--locked` flags.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
with:
|
||||
locked: true
|
||||
# or
|
||||
@@ -152,12 +164,12 @@ There are two types of debug logging that you can enable.
|
||||
#### Debug logging of the action
|
||||
|
||||
The first one is the debug logging of the action itself.
|
||||
This can be enabled by running the action with the `RUNNER_DEBUG` environment variable set to `true`.
|
||||
This can be enabled by running the action with the `ACTIONS_RUNNER_DEBUG` environment variable set to `true`.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
env:
|
||||
RUNNER_DEBUG: true
|
||||
ACTIONS_RUNNER_DEBUG: true
|
||||
```
|
||||
|
||||
Alternatively, you can enable debug logging for the action by re-running the action in debug mode:
|
||||
@@ -173,7 +185,7 @@ The second type is the debug logging of the pixi executable.
|
||||
This can be specified by setting the `log-level` input.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
with:
|
||||
# one of `q`, `default`, `v`, `vv`, or `vvv`.
|
||||
log-level: vvv
|
||||
@@ -199,7 +211,7 @@ If nothing is specified, `setup-pixi` will default to `true`.
|
||||
On self-hosted runners, you also might want to alter the default pixi install location to a temporary location. You can use `pixi-bin-path: ${{ runner.temp }}/bin/pixi` to do this.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
- uses: prefix-dev/setup-pixi@v0.4.1
|
||||
with:
|
||||
post-cleanup: true
|
||||
# ${{ runner.temp }}\Scripts\pixi.exe on Windows
|
||||
|
||||
Reference in New Issue
Block a user