mirror of
https://github.com/prefix-dev/setup-pixi
synced 2026-10-08 15:04:08 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19b5e6071f | ||
|
|
afa1d6a5d1 | ||
|
|
52708b32f2 | ||
|
|
c2a7a27098 | ||
|
|
ad0427dce9 | ||
|
|
77992cdabd | ||
|
|
a07becb301 | ||
|
|
3f5ab780ba |
@@ -45,7 +45,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
latest_version="$(jq -r '.version' package.json)"
|
||||
count_expected=10
|
||||
count_expected=12
|
||||
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."
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
|
||||
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50
|
||||
if: failure() && github.ref_name == 'main'
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
+142
-24
@@ -11,7 +11,7 @@ jobs:
|
||||
default:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
|
||||
cache: [true, false]
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: default ${{ matrix.cache == true && 'with' || 'without' }} cache (${{ matrix.os }})
|
||||
@@ -26,15 +26,15 @@ jobs:
|
||||
- run: |
|
||||
set -o pipefail
|
||||
pixi info
|
||||
test -f .pixi/env/bin/python
|
||||
./.pixi/env/bin/python --version | grep -q 3.11
|
||||
test -f .pixi/envs/default/bin/python
|
||||
./.pixi/envs/default/bin/python --version | grep -q 3.11
|
||||
shell: bash
|
||||
if: matrix.os != 'windows-latest'
|
||||
- run: |
|
||||
set -o pipefail
|
||||
pixi info
|
||||
test -f .pixi/env/python.exe
|
||||
./.pixi/env/python.exe --version | grep -q 3.11
|
||||
test -f .pixi/envs/default/python.exe
|
||||
./.pixi/envs/default/python.exe --version | grep -q 3.11
|
||||
shell: bash
|
||||
if: matrix.os == 'windows-latest'
|
||||
- run: |
|
||||
@@ -61,12 +61,12 @@ jobs:
|
||||
custom-pixi-version:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi.toml
|
||||
run: mv test/default/* .
|
||||
run: mv test/old-pixi-lockfiles/* .
|
||||
- uses: ./
|
||||
with:
|
||||
cache: false
|
||||
@@ -75,6 +75,58 @@ jobs:
|
||||
locked: false
|
||||
- run: pixi --version | grep -q "pixi 0.1.0"
|
||||
|
||||
old-lockfile:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
locked: [true, false]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi.toml
|
||||
run: mv test/old-pixi-lockfiles/* .
|
||||
- uses: ./
|
||||
with:
|
||||
pixi-version: latest
|
||||
cache: false
|
||||
locked: ${{ matrix.locked }}
|
||||
- if: matrix.os == 'windows-latest'
|
||||
run: choco install yq
|
||||
# assert that the lockfile wasn't updated
|
||||
- run: test "$(yq '.version' pixi.lock)" = 1
|
||||
|
||||
install-path:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./
|
||||
with:
|
||||
run-install: false
|
||||
- run: test "$(which pixi)" = "$HOME/.pixi/bin/pixi"
|
||||
shell: bash
|
||||
|
||||
global-install:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./
|
||||
with:
|
||||
run-install: false
|
||||
- run: pixi global install cowpy
|
||||
- run: |
|
||||
pixi global list 2>&1 | grep cowpy
|
||||
cowpy hello world
|
||||
test "$(which cowpy)" = "$HOME/.pixi/bin/cowpy"
|
||||
if: matrix.os != 'windows-latest'
|
||||
- run: cowpy hello world
|
||||
if: matrix.os == 'windows-latest'
|
||||
|
||||
frozen:
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -110,14 +162,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi.toml
|
||||
run: mv test/default/* .
|
||||
run: mv test/old-pixi-lockfiles/* .
|
||||
- uses: ./
|
||||
with:
|
||||
cache: false
|
||||
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.0.8/pixi-x86_64-unknown-linux-musl
|
||||
# pixi 0.0.8 doesn't support --locked
|
||||
locked: false
|
||||
- run: pixi --version | grep -q "pixi 0.0.8"
|
||||
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.13.0/pixi-x86_64-unknown-linux-musl
|
||||
- run: pixi --version | grep -q "pixi 0.13.0"
|
||||
|
||||
custom-manifest-path:
|
||||
strategy:
|
||||
@@ -246,7 +296,7 @@ jobs:
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
- name: Ensure private-package is installed
|
||||
run: |
|
||||
test -f .pixi/env/conda-meta/private-package-0.0.1-0.json
|
||||
test -f .pixi/envs/default/conda-meta/private-package-0.0.1-0.json
|
||||
|
||||
pixi-shell:
|
||||
strategy:
|
||||
@@ -368,24 +418,77 @@ jobs:
|
||||
- name: Move pixi.toml
|
||||
run: mv test/no-lockfile/* .
|
||||
- uses: ./
|
||||
with:
|
||||
cache: false
|
||||
- run: |
|
||||
set -o pipefail
|
||||
pixi info
|
||||
test -f .pixi/env/bin/python
|
||||
./.pixi/env/bin/python --version | grep -q 3.11
|
||||
test -f .pixi/envs/default/bin/python
|
||||
./.pixi/envs/default/bin/python --version | grep -q 3.11
|
||||
shell: bash
|
||||
if: matrix.os != 'windows-latest'
|
||||
- run: |
|
||||
set -o pipefail
|
||||
pixi info
|
||||
test -f .pixi/env/python.exe
|
||||
./.pixi/env/python.exe --version | grep -q 3.11
|
||||
test -f .pixi/envs/default/python.exe
|
||||
./.pixi/envs/default/python.exe --version | grep -q 3.11
|
||||
shell: bash
|
||||
if: matrix.os == 'windows-latest'
|
||||
- run: |
|
||||
pixi run python --version | grep -q 3.11
|
||||
pixi run test | grep -q "Hello world"
|
||||
|
||||
multiple-environments:
|
||||
name: multiple-environments (${{ matrix.os }}, cache=${{ matrix.cache }})
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
|
||||
cache: ['true', 'false']
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi.toml
|
||||
run: mv test/multiple-environments/* .
|
||||
- uses: ./
|
||||
with:
|
||||
environments: py311 py312
|
||||
cache: ${{ matrix.cache }}
|
||||
- run: |
|
||||
set -o pipefail
|
||||
pixi info
|
||||
test -f .pixi/envs/py311/bin/python
|
||||
test -f .pixi/envs/py312/bin/python
|
||||
! test -d .pixi/envs/default
|
||||
./.pixi/envs/py311/bin/python --version | grep -q 3.11
|
||||
./.pixi/envs/py312/bin/python --version | grep -q 3.12
|
||||
shell: bash
|
||||
if: matrix.os != 'windows-latest'
|
||||
- run: |
|
||||
set -o pipefail
|
||||
pixi info
|
||||
test -f .pixi/envs/py311/python.exe
|
||||
test -f .pixi/envs/py312/python.exe
|
||||
! test -d .pixi/envs/default
|
||||
./.pixi/envs/py311/python.exe --version | grep -q 3.11
|
||||
./.pixi/envs/py312/python.exe --version | grep -q 3.12
|
||||
shell: bash
|
||||
if: matrix.os == 'windows-latest'
|
||||
|
||||
cache-write-true:
|
||||
timeout-minutes: 10
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi files
|
||||
run: mv test/default/* .
|
||||
- uses: ./
|
||||
with:
|
||||
cache-write: true
|
||||
|
||||
test-cache1:
|
||||
name: Test cache 1/2
|
||||
timeout-minutes: 10
|
||||
@@ -393,7 +496,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi files
|
||||
@@ -404,10 +507,10 @@ jobs:
|
||||
cache-key: test-cache-${{ github.sha }}-${{ github.run_attempt }}-
|
||||
# check the action logs to see if the cache was written
|
||||
- run: |
|
||||
test -f .pixi/env/bin/python
|
||||
test -f .pixi/envs/default/bin/python
|
||||
if: matrix.os != 'windows-latest'
|
||||
- run: |
|
||||
test -f .pixi/env/python.exe
|
||||
test -f .pixi/envs/default/python.exe
|
||||
if: matrix.os == 'windows-latest'
|
||||
|
||||
test-cache2:
|
||||
@@ -418,7 +521,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi files
|
||||
@@ -429,10 +532,10 @@ jobs:
|
||||
cache-key: test-cache-${{ github.sha }}-${{ github.run_attempt }}-
|
||||
# check the action logs to see if the cache was restored
|
||||
- run: |
|
||||
test -f .pixi/env/bin/python
|
||||
test -f .pixi/envs/default/bin/python
|
||||
if: matrix.os != 'windows-latest'
|
||||
- run: |
|
||||
test -f .pixi/env/python.exe
|
||||
test -f .pixi/envs/default/python.exe
|
||||
if: matrix.os == 'windows-latest'
|
||||
|
||||
test-cache-no-write:
|
||||
@@ -442,7 +545,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi files
|
||||
@@ -554,3 +657,18 @@ jobs:
|
||||
# # locked: true is implicit
|
||||
# - run: exit 1
|
||||
# if: success()
|
||||
|
||||
# cache-write-true-no-lockfile:
|
||||
# timeout-minutes: 10
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - name: Move pixi files
|
||||
# run: mv test/no-lockfile/* .
|
||||
# - uses: ./
|
||||
# with:
|
||||
# cache-write: true
|
||||
|
||||
@@ -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.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
pixi-version: v0.12.0
|
||||
pixi-version: v0.13.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.4.3`) to avoid breaking changes.
|
||||
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.5.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).
|
||||
>
|
||||
> Put the following in your `.github/dependabot.yml` file to enable Dependabot for your GitHub Actions:
|
||||
@@ -73,12 +73,72 @@ In order to not exceed the [10 GB cache size limit](https://docs.github.com/en/a
|
||||
This can be done by setting the `cache-write` argument.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
cache: true
|
||||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
|
||||
```
|
||||
|
||||
### Multiple environments
|
||||
|
||||
With pixi, you can create multiple environments for different requirements.
|
||||
You can also specify which environment(s) you want to install by setting the `environments` input argument.
|
||||
This will install all environments that are specified and cache them.
|
||||
|
||||
```toml
|
||||
[project]
|
||||
name = "my-package"
|
||||
channels = ["conda-forge"]
|
||||
platforms = ["linux-64"]
|
||||
|
||||
[dependencies]
|
||||
python = ">=3.11"
|
||||
pip = "*"
|
||||
polars = ">=0.14.24,<0.21"
|
||||
|
||||
[feature.py311.dependencies]
|
||||
python = "3.11.*"
|
||||
[feature.py312.dependencies]
|
||||
python = "3.12.*"
|
||||
|
||||
[environments]
|
||||
py311 = ["py311"]
|
||||
py312 = ["py312"]
|
||||
```
|
||||
|
||||
#### Multiple environments using a matrix
|
||||
|
||||
The following example will install the `py311` and `py312` environments in different jobs.
|
||||
|
||||
```yml
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
environment: [py311, py312]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
environments: ${{ matrix.environment }}
|
||||
```
|
||||
|
||||
#### Install multiple environments in one job
|
||||
|
||||
The following example will install both the `py311` and the `py312` environment on the runner.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
# separated by spaces
|
||||
environments: >-
|
||||
py311
|
||||
py312
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> If you don't specify any environment, the `default` environment will be installed and cached, even if you use other environments.
|
||||
|
||||
### Authentication
|
||||
|
||||
There are currently three ways to authenticate with pixi:
|
||||
@@ -100,7 +160,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.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
auth-host: prefix.dev
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
@@ -112,7 +172,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.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
auth-host: custom-artifactory.com
|
||||
auth-username: ${{ secrets.PIXI_USERNAME }}
|
||||
@@ -125,7 +185,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.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
auth-host: anaconda.org # or my-quetz-instance.com
|
||||
conda-token: ${{ secrets.CONDA_TOKEN }}
|
||||
@@ -163,7 +223,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.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
locked: true
|
||||
# or
|
||||
@@ -182,7 +242,7 @@ 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`.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
env:
|
||||
RUNNER_DEBUG: true
|
||||
```
|
||||
@@ -200,13 +260,13 @@ 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.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
# one of `q`, `default`, `v`, `vv`, or `vvv`.
|
||||
log-level: vvv
|
||||
```
|
||||
|
||||
If nothing is specified, `setup-pixi` will default to `default` or `vv` depending on if [debug logging is enabled for the action](#debug-logging-of-the-action).
|
||||
If nothing is specified, `log-level` will default to `default` or `vv` depending on if [debug logging is enabled for the action](#debug-logging-of-the-action).
|
||||
|
||||
### Self-hosted runners
|
||||
|
||||
@@ -221,12 +281,12 @@ If you set `post-cleanup` to `true`, the action will delete the following files:
|
||||
- the rattler cache
|
||||
- other rattler files in `~/.rattler`
|
||||
|
||||
If nothing is specified, `setup-pixi` will default to `true`.
|
||||
If nothing is specified, `post-cleanup` 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.4.3
|
||||
- uses: prefix-dev/setup-pixi@v0.5.1
|
||||
with:
|
||||
post-cleanup: true
|
||||
# ${{ runner.temp }}\Scripts\pixi.exe on Windows
|
||||
|
||||
@@ -18,6 +18,9 @@ inputs:
|
||||
description: Path to the manifest file (i.e., `pixi.toml`) to use for the pixi CLI. Defaults to `pixi.toml`.
|
||||
run-install:
|
||||
description: Whether to run `pixi install` after setting up the environment. Defaults to `true`.
|
||||
environments:
|
||||
description: |
|
||||
A space-separated list of environments to install. If not specified, only the default environment is installed.
|
||||
locked:
|
||||
description: Whether to use `pixi install --locked`. Defaults to `true` when the lockfile is present, otherwise `false`.
|
||||
frozen:
|
||||
|
||||
+17911
-377
File diff suppressed because one or more lines are too long
+15
-3
@@ -5871,6 +5871,13 @@ var parseOrUndefinedJSON = (key, schema) => {
|
||||
}
|
||||
return schema.parse(JSON.parse(input));
|
||||
};
|
||||
var parseOrUndefinedList = (key, schema) => {
|
||||
const input = core.getInput(key);
|
||||
if (input === "") {
|
||||
return void 0;
|
||||
}
|
||||
return input.split(" ").map((s) => schema.parse(s)).filter((s) => s !== "");
|
||||
};
|
||||
var validateInputs = (inputs) => {
|
||||
if (inputs.pixiVersion && inputs.pixiUrl) {
|
||||
throw new Error("You need to specify either pixi-version or pixi-url");
|
||||
@@ -5906,8 +5913,8 @@ var validateInputs = (inputs) => {
|
||||
throw new Error("You need to specify auth-host");
|
||||
}
|
||||
}
|
||||
if (inputs.cacheWrite && !inputs.cacheKey && !inputs.cache) {
|
||||
throw new Error("cache-write is only valid with cache-key or cache specified.");
|
||||
if (inputs.runInstall === false && inputs.environments) {
|
||||
throw new Error("Cannot specify environments without running install");
|
||||
}
|
||||
};
|
||||
var inferOptions = (inputs) => {
|
||||
@@ -5918,7 +5925,10 @@ var inferOptions = (inputs) => {
|
||||
const pixiLockFile = import_path.default.join(import_path.default.dirname(manifestPath), import_path.default.basename(manifestPath).replace(/\.toml$/, ".lock"));
|
||||
const lockFileAvailable = (0, import_fs.existsSync)(pixiLockFile);
|
||||
core.debug(`lockFileAvailable: ${lockFileAvailable}`);
|
||||
const cache = inputs.cacheKey ? { cacheKeyPrefix: inputs.cacheKey, cacheWrite: inputs.cacheWrite ?? true } : inputs.cache === true || lockFileAvailable && inputs.cache !== false ? { cacheKeyPrefix: "pixi-", cacheWrite: true } : void 0;
|
||||
if (!lockFileAvailable && inputs.cacheWrite === true) {
|
||||
throw new Error("You cannot specify cache-write = true without a lock file present");
|
||||
}
|
||||
const cache = inputs.cacheKey ? { cacheKeyPrefix: inputs.cacheKey, cacheWrite: inputs.cacheWrite ?? true } : inputs.cache === true || lockFileAvailable && inputs.cache !== false ? { cacheKeyPrefix: "pixi-", cacheWrite: inputs.cacheWrite ?? true } : void 0;
|
||||
const pixiBinPath = inputs.pixiBinPath ? import_path.default.resolve(untildify(inputs.pixiBinPath)) : PATHS.pixiBin;
|
||||
const frozen = inputs.frozen ?? false;
|
||||
const locked = inputs.locked ?? (lockFileAvailable && !frozen);
|
||||
@@ -5940,6 +5950,7 @@ var inferOptions = (inputs) => {
|
||||
manifestPath,
|
||||
pixiLockFile,
|
||||
runInstall,
|
||||
environments: inputs.environments,
|
||||
frozen,
|
||||
locked,
|
||||
cache,
|
||||
@@ -5965,6 +5976,7 @@ var getOptions = () => {
|
||||
),
|
||||
manifestPath: parseOrUndefined("manifest-path", stringType()),
|
||||
runInstall: parseOrUndefinedJSON("run-install", booleanType()),
|
||||
environments: parseOrUndefinedList("environments", stringType()),
|
||||
locked: parseOrUndefinedJSON("locked", booleanType()),
|
||||
frozen: parseOrUndefinedJSON("frozen", booleanType()),
|
||||
cache: parseOrUndefinedJSON("cache", booleanType()),
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-pixi",
|
||||
"version": "0.4.3",
|
||||
"version": "0.5.1",
|
||||
"private": true,
|
||||
"description": "Action to set up the pixi package manager.",
|
||||
"scripts": {
|
||||
@@ -21,7 +21,7 @@
|
||||
"author": "Pavel Zwerschke <pavelzw@gmail.com>",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.2.2",
|
||||
"@actions/cache": "^3.2.3",
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.3",
|
||||
@@ -30,17 +30,17 @@
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.10.6",
|
||||
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
||||
"@typescript-eslint/parser": "^6.16.0",
|
||||
"@types/node": "^20.11.14",
|
||||
"@typescript-eslint/eslint-plugin": "^6.20.0",
|
||||
"@typescript-eslint/parser": "^6.20.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-n": "^16.6.0",
|
||||
"eslint-plugin-prettier": "^5.1.2",
|
||||
"eslint-plugin-n": "^16.6.2",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"prettier": "^3.1.1",
|
||||
"prettier": "^3.2.4",
|
||||
"tsup": "^8.0.1",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
|
||||
Generated
+125
-110
@@ -6,8 +6,8 @@ settings:
|
||||
|
||||
dependencies:
|
||||
'@actions/cache':
|
||||
specifier: ^3.2.2
|
||||
version: 3.2.2
|
||||
specifier: ^3.2.3
|
||||
version: 3.2.3
|
||||
'@actions/core':
|
||||
specifier: ^1.10.1
|
||||
version: 1.10.1
|
||||
@@ -29,14 +29,14 @@ dependencies:
|
||||
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^20.10.6
|
||||
version: 20.10.6
|
||||
specifier: ^20.11.14
|
||||
version: 20.11.14
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: ^6.16.0
|
||||
version: 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3)
|
||||
specifier: ^6.20.0
|
||||
version: 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/parser':
|
||||
specifier: ^6.16.0
|
||||
version: 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
specifier: ^6.20.0
|
||||
version: 6.20.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
eslint:
|
||||
specifier: ^8.56.0
|
||||
version: 8.56.0
|
||||
@@ -45,22 +45,22 @@ devDependencies:
|
||||
version: 9.1.0(eslint@8.56.0)
|
||||
eslint-config-standard:
|
||||
specifier: ^17.1.0
|
||||
version: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)
|
||||
version: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.29.1
|
||||
version: 2.29.1(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)
|
||||
version: 2.29.1(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)
|
||||
eslint-plugin-n:
|
||||
specifier: ^16.6.0
|
||||
version: 16.6.0(eslint@8.56.0)
|
||||
specifier: ^16.6.2
|
||||
version: 16.6.2(eslint@8.56.0)
|
||||
eslint-plugin-prettier:
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1)
|
||||
specifier: ^5.1.3
|
||||
version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.4)
|
||||
eslint-plugin-promise:
|
||||
specifier: ^6.1.1
|
||||
version: 6.1.1(eslint@8.56.0)
|
||||
prettier:
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
specifier: ^3.2.4
|
||||
version: 3.2.4
|
||||
tsup:
|
||||
specifier: ^8.0.1
|
||||
version: 8.0.1(typescript@5.3.3)
|
||||
@@ -75,17 +75,17 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/@actions/cache@3.2.2:
|
||||
resolution: {integrity: sha512-6D0Jq5JrLZRQ3VApeQwQkkV20ZZXjXsHNYXd9VjNUdi9E0h93wESpxfMJ2JWLCUCgHNLcfY0v3GjNM+2FdRMlg==}
|
||||
/@actions/cache@3.2.3:
|
||||
resolution: {integrity: sha512-m8KvmcD+JxSLOfNUXuBF2jL0Lp+co/Fhbf0NTt0M9lz61WnXRdqpIGrOvTRZmKIl+7HaHil6kGE3fkEfrKQCQA==}
|
||||
dependencies:
|
||||
'@actions/core': 1.10.1
|
||||
'@actions/exec': 1.1.1
|
||||
'@actions/glob': 0.1.2
|
||||
'@actions/http-client': 2.1.1
|
||||
'@actions/http-client': 2.2.0
|
||||
'@actions/io': 1.1.3
|
||||
'@azure/abort-controller': 1.1.0
|
||||
'@azure/ms-rest-js': 2.7.0
|
||||
'@azure/storage-blob': 12.15.0
|
||||
'@azure/storage-blob': 12.17.0
|
||||
semver: 6.3.1
|
||||
uuid: 3.4.0
|
||||
transitivePeerDependencies:
|
||||
@@ -118,6 +118,13 @@ packages:
|
||||
tunnel: 0.0.6
|
||||
dev: false
|
||||
|
||||
/@actions/http-client@2.2.0:
|
||||
resolution: {integrity: sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==}
|
||||
dependencies:
|
||||
tunnel: 0.0.6
|
||||
undici: 5.28.2
|
||||
dev: false
|
||||
|
||||
/@actions/io@1.1.3:
|
||||
resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==}
|
||||
dev: false
|
||||
@@ -145,20 +152,20 @@ packages:
|
||||
engines: {node: '>=14.0.0'}
|
||||
dependencies:
|
||||
'@azure/abort-controller': 1.1.0
|
||||
'@azure/core-util': 1.4.0
|
||||
'@azure/core-util': 1.6.1
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
|
||||
/@azure/core-http@3.0.3:
|
||||
resolution: {integrity: sha512-QMib3wXotJMFhHgmJBPUF9YsyErw34H0XDFQd9CauH7TPB+RGcyl9Ayy7iURtJB04ngXhE6YwrQsWDXlSLrilg==}
|
||||
/@azure/core-http@3.0.4:
|
||||
resolution: {integrity: sha512-Fok9VVhMdxAFOtqiiAtg74fL0UJkt0z3D+ouUUxcRLzZNBioPRAMJFVxiWoJljYpXsRi4GDQHzQHDc9AiYaIUQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
dependencies:
|
||||
'@azure/abort-controller': 1.1.0
|
||||
'@azure/core-auth': 1.5.0
|
||||
'@azure/core-tracing': 1.0.0-preview.13
|
||||
'@azure/core-util': 1.4.0
|
||||
'@azure/core-util': 1.6.1
|
||||
'@azure/logger': 1.0.4
|
||||
'@types/node-fetch': 2.6.4
|
||||
'@types/node-fetch': 2.6.11
|
||||
'@types/tunnel': 0.0.3
|
||||
form-data: 4.0.0
|
||||
node-fetch: 2.7.0
|
||||
@@ -176,7 +183,7 @@ packages:
|
||||
engines: {node: '>=14.0.0'}
|
||||
dependencies:
|
||||
'@azure/abort-controller': 1.1.0
|
||||
'@azure/core-util': 1.4.0
|
||||
'@azure/core-util': 1.6.1
|
||||
'@azure/logger': 1.0.4
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
@@ -192,13 +199,13 @@ packages:
|
||||
resolution: {integrity: sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
'@opentelemetry/api': 1.4.1
|
||||
'@opentelemetry/api': 1.7.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
|
||||
/@azure/core-util@1.4.0:
|
||||
resolution: {integrity: sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
/@azure/core-util@1.6.1:
|
||||
resolution: {integrity: sha512-h5taHeySlsV9qxuK64KZxy4iln1BtMYlNt5jbuEFN3UFSAd1EwKg/Gjl5a6tZ/W8t6li3xPnutOx7zbDyXnPmQ==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
dependencies:
|
||||
'@azure/abort-controller': 1.1.0
|
||||
tslib: 2.6.2
|
||||
@@ -226,12 +233,12 @@ packages:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/@azure/storage-blob@12.15.0:
|
||||
resolution: {integrity: sha512-e7JBKLOFi0QVJqqLzrjx1eL3je3/Ug2IQj24cTM9b85CsnnFjLGeGjJVIjbGGZaytewiCEG7r3lRwQX7fKj0/w==}
|
||||
/@azure/storage-blob@12.17.0:
|
||||
resolution: {integrity: sha512-sM4vpsCpcCApagRW5UIjQNlNylo02my2opgp0Emi8x888hZUvJ3dN69Oq20cEGXkMUWnoCrBaB0zyS3yeB87sQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
dependencies:
|
||||
'@azure/abort-controller': 1.1.0
|
||||
'@azure/core-http': 3.0.3
|
||||
'@azure/core-http': 3.0.4
|
||||
'@azure/core-lro': 2.5.4
|
||||
'@azure/core-paging': 1.5.0
|
||||
'@azure/core-tracing': 1.0.0-preview.13
|
||||
@@ -477,6 +484,11 @@ packages:
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@fastify/busboy@2.1.0:
|
||||
resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==}
|
||||
engines: {node: '>=14'}
|
||||
dev: false
|
||||
|
||||
/@humanwhocodes/config-array@0.11.13:
|
||||
resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==}
|
||||
engines: {node: '>=10.10.0'}
|
||||
@@ -548,13 +560,13 @@ packages:
|
||||
fastq: 1.15.0
|
||||
dev: true
|
||||
|
||||
/@opentelemetry/api@1.4.1:
|
||||
resolution: {integrity: sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==}
|
||||
/@opentelemetry/api@1.7.0:
|
||||
resolution: {integrity: sha512-AdY5wvN0P2vXBi3b29hxZgSFvdhdxPB9+f0B6s//P9Q8nibRWeA3cHm8UmLpio9ABigkVHJ5NMPk+Mz8VCCyrw==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
dev: false
|
||||
|
||||
/@pkgr/core@0.1.0:
|
||||
resolution: {integrity: sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==}
|
||||
/@pkgr/core@0.1.1:
|
||||
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
|
||||
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
@@ -662,15 +674,15 @@ packages:
|
||||
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
||||
dev: true
|
||||
|
||||
/@types/node-fetch@2.6.4:
|
||||
resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==}
|
||||
/@types/node-fetch@2.6.11:
|
||||
resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==}
|
||||
dependencies:
|
||||
'@types/node': 20.10.6
|
||||
form-data: 3.0.1
|
||||
'@types/node': 20.11.14
|
||||
form-data: 4.0.0
|
||||
dev: false
|
||||
|
||||
/@types/node@20.10.6:
|
||||
resolution: {integrity: sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==}
|
||||
/@types/node@20.11.14:
|
||||
resolution: {integrity: sha512-w3yWCcwULefjP9DmDDsgUskrMoOy5Z8MiwKHr1FvqGPtx7CvJzQvxD7eKpxNtklQxLruxSXWddyeRtyud0RcXQ==}
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
|
||||
@@ -681,11 +693,11 @@ packages:
|
||||
/@types/tunnel@0.0.3:
|
||||
resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==}
|
||||
dependencies:
|
||||
'@types/node': 20.10.6
|
||||
'@types/node': 20.11.14
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==}
|
||||
/@typescript-eslint/eslint-plugin@6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
|
||||
@@ -696,15 +708,15 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.10.0
|
||||
'@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/scope-manager': 6.16.0
|
||||
'@typescript-eslint/type-utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/visitor-keys': 6.16.0
|
||||
'@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/scope-manager': 6.20.0
|
||||
'@typescript-eslint/type-utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/visitor-keys': 6.20.0
|
||||
debug: 4.3.4
|
||||
eslint: 8.56.0
|
||||
graphemer: 1.4.0
|
||||
ignore: 5.3.0
|
||||
ignore: 5.3.1
|
||||
natural-compare: 1.4.0
|
||||
semver: 7.5.4
|
||||
ts-api-utils: 1.0.3(typescript@5.3.3)
|
||||
@@ -713,8 +725,8 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/parser@6.16.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw==}
|
||||
/@typescript-eslint/parser@6.20.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
@@ -723,10 +735,10 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 6.16.0
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3)
|
||||
'@typescript-eslint/visitor-keys': 6.16.0
|
||||
'@typescript-eslint/scope-manager': 6.20.0
|
||||
'@typescript-eslint/types': 6.20.0
|
||||
'@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3)
|
||||
'@typescript-eslint/visitor-keys': 6.20.0
|
||||
debug: 4.3.4
|
||||
eslint: 8.56.0
|
||||
typescript: 5.3.3
|
||||
@@ -734,16 +746,16 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/scope-manager@6.16.0:
|
||||
resolution: {integrity: sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw==}
|
||||
/@typescript-eslint/scope-manager@6.20.0:
|
||||
resolution: {integrity: sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/visitor-keys': 6.16.0
|
||||
'@typescript-eslint/types': 6.20.0
|
||||
'@typescript-eslint/visitor-keys': 6.20.0
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/type-utils@6.16.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg==}
|
||||
/@typescript-eslint/type-utils@6.20.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
@@ -752,8 +764,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3)
|
||||
'@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3)
|
||||
'@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
debug: 4.3.4
|
||||
eslint: 8.56.0
|
||||
ts-api-utils: 1.0.3(typescript@5.3.3)
|
||||
@@ -762,13 +774,13 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/types@6.16.0:
|
||||
resolution: {integrity: sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ==}
|
||||
/@typescript-eslint/types@6.20.0:
|
||||
resolution: {integrity: sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/typescript-estree@6.16.0(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==}
|
||||
/@typescript-eslint/typescript-estree@6.20.0(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
@@ -776,8 +788,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/visitor-keys': 6.16.0
|
||||
'@typescript-eslint/types': 6.20.0
|
||||
'@typescript-eslint/visitor-keys': 6.20.0
|
||||
debug: 4.3.4
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
@@ -789,8 +801,8 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==}
|
||||
/@typescript-eslint/utils@6.20.0(eslint@8.56.0)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
@@ -798,9 +810,9 @@ packages:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0)
|
||||
'@types/json-schema': 7.0.15
|
||||
'@types/semver': 7.5.6
|
||||
'@typescript-eslint/scope-manager': 6.16.0
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3)
|
||||
'@typescript-eslint/scope-manager': 6.20.0
|
||||
'@typescript-eslint/types': 6.20.0
|
||||
'@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3)
|
||||
eslint: 8.56.0
|
||||
semver: 7.5.4
|
||||
transitivePeerDependencies:
|
||||
@@ -808,11 +820,11 @@ packages:
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/visitor-keys@6.16.0:
|
||||
resolution: {integrity: sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A==}
|
||||
/@typescript-eslint/visitor-keys@6.20.0:
|
||||
resolution: {integrity: sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.16.0
|
||||
'@typescript-eslint/types': 6.20.0
|
||||
eslint-visitor-keys: 3.4.3
|
||||
dev: true
|
||||
|
||||
@@ -1271,7 +1283,7 @@ packages:
|
||||
eslint: 8.56.0
|
||||
dev: true
|
||||
|
||||
/eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0):
|
||||
/eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.1.1)(eslint@8.56.0):
|
||||
resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1281,8 +1293,8 @@ packages:
|
||||
eslint-plugin-promise: ^6.0.0
|
||||
dependencies:
|
||||
eslint: 8.56.0
|
||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)
|
||||
eslint-plugin-n: 16.6.0(eslint@8.56.0)
|
||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)
|
||||
eslint-plugin-n: 16.6.2(eslint@8.56.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
|
||||
dev: true
|
||||
|
||||
@@ -1296,7 +1308,7 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.16.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0):
|
||||
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0):
|
||||
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
@@ -1317,7 +1329,7 @@ packages:
|
||||
eslint-import-resolver-webpack:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
debug: 3.2.7
|
||||
eslint: 8.56.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
@@ -1337,7 +1349,7 @@ packages:
|
||||
eslint-compat-utils: 0.1.2(eslint@8.56.0)
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.16.0)(eslint@8.56.0):
|
||||
/eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.20.0)(eslint@8.56.0):
|
||||
resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
@@ -1347,7 +1359,7 @@ packages:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
'@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3)
|
||||
array-includes: 3.1.7
|
||||
array.prototype.findlastindex: 1.2.3
|
||||
array.prototype.flat: 1.3.2
|
||||
@@ -1356,7 +1368,7 @@ packages:
|
||||
doctrine: 2.1.0
|
||||
eslint: 8.56.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.16.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0)
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.20.0)(eslint-import-resolver-node@0.3.9)(eslint@8.56.0)
|
||||
hasown: 2.0.0
|
||||
is-core-module: 2.13.1
|
||||
is-glob: 4.0.3
|
||||
@@ -1372,8 +1384,8 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-n@16.6.0(eslint@8.56.0):
|
||||
resolution: {integrity: sha512-Ag3tYFF90lYU8JdHEl9qSSpeLYbVnO+Oj7sgPUarWUacv1mPL3d5h5yG4Bv3tLe71hrcxmgTi7oByYwKXaVatw==}
|
||||
/eslint-plugin-n@16.6.2(eslint@8.56.0):
|
||||
resolution: {integrity: sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
peerDependencies:
|
||||
eslint: '>=7.0.0'
|
||||
@@ -1384,7 +1396,7 @@ packages:
|
||||
eslint-plugin-es-x: 7.5.0(eslint@8.56.0)
|
||||
get-tsconfig: 4.7.2
|
||||
globals: 13.24.0
|
||||
ignore: 5.3.0
|
||||
ignore: 5.3.1
|
||||
is-builtin-module: 3.2.1
|
||||
is-core-module: 2.13.1
|
||||
minimatch: 3.1.2
|
||||
@@ -1392,8 +1404,8 @@ packages:
|
||||
semver: 7.5.4
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-prettier@5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1):
|
||||
resolution: {integrity: sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==}
|
||||
/eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.2.4):
|
||||
resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
'@types/eslint': '>=8.0.0'
|
||||
@@ -1408,7 +1420,7 @@ packages:
|
||||
dependencies:
|
||||
eslint: 8.56.0
|
||||
eslint-config-prettier: 9.1.0(eslint@8.56.0)
|
||||
prettier: 3.1.1
|
||||
prettier: 3.2.4
|
||||
prettier-linter-helpers: 1.0.0
|
||||
synckit: 0.8.8
|
||||
dev: true
|
||||
@@ -1623,15 +1635,6 @@ packages:
|
||||
mime-types: 2.1.35
|
||||
dev: false
|
||||
|
||||
/form-data@3.0.1:
|
||||
resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==}
|
||||
engines: {node: '>= 6'}
|
||||
dependencies:
|
||||
asynckit: 0.4.0
|
||||
combined-stream: 1.0.8
|
||||
mime-types: 2.1.35
|
||||
dev: false
|
||||
|
||||
/form-data@4.0.0:
|
||||
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
|
||||
engines: {node: '>= 6'}
|
||||
@@ -1756,7 +1759,7 @@ packages:
|
||||
array-union: 2.1.0
|
||||
dir-glob: 3.0.1
|
||||
fast-glob: 3.3.2
|
||||
ignore: 5.3.0
|
||||
ignore: 5.3.1
|
||||
merge2: 1.4.1
|
||||
slash: 3.0.0
|
||||
dev: true
|
||||
@@ -1820,6 +1823,11 @@ packages:
|
||||
engines: {node: '>= 4'}
|
||||
dev: true
|
||||
|
||||
/ignore@5.3.1:
|
||||
resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==}
|
||||
engines: {node: '>= 4'}
|
||||
dev: true
|
||||
|
||||
/import-fresh@3.3.0:
|
||||
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -2329,8 +2337,8 @@ packages:
|
||||
fast-diff: 1.3.0
|
||||
dev: true
|
||||
|
||||
/prettier@3.1.1:
|
||||
resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==}
|
||||
/prettier@3.2.4:
|
||||
resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
@@ -2444,8 +2452,8 @@ packages:
|
||||
is-regex: 1.1.4
|
||||
dev: true
|
||||
|
||||
/sax@1.2.4:
|
||||
resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}
|
||||
/sax@1.3.0:
|
||||
resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==}
|
||||
dev: false
|
||||
|
||||
/semver@6.3.1:
|
||||
@@ -2592,7 +2600,7 @@ packages:
|
||||
resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
dependencies:
|
||||
'@pkgr/core': 0.1.0
|
||||
'@pkgr/core': 0.1.1
|
||||
tslib: 2.6.2
|
||||
dev: true
|
||||
|
||||
@@ -2776,6 +2784,13 @@ packages:
|
||||
/undici-types@5.26.5:
|
||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||
|
||||
/undici@5.28.2:
|
||||
resolution: {integrity: sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==}
|
||||
engines: {node: '>=14.0'}
|
||||
dependencies:
|
||||
'@fastify/busboy': 2.1.0
|
||||
dev: false
|
||||
|
||||
/untildify@5.0.0:
|
||||
resolution: {integrity: sha512-bOgQLUnd2G5rhzaTvh1VCI9Fo6bC5cLTpH17T5aFfamyXFYDbbdzN6IXdeoc3jBS7T9hNTmJtYUzJCJ2Xlc9gA==}
|
||||
engines: {node: '>=16'}
|
||||
@@ -2858,7 +2873,7 @@ packages:
|
||||
resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
dependencies:
|
||||
sax: 1.2.4
|
||||
sax: 1.3.0
|
||||
xmlbuilder: 11.0.1
|
||||
dev: false
|
||||
|
||||
|
||||
+3
-1
@@ -16,10 +16,12 @@ export const generateCacheKey = async (cacheKeyPrefix: string) =>
|
||||
// since conda envs are not relocatable, we need to include the path in the cache key
|
||||
const lockfilePathSha = sha256(options.pixiLockFile)
|
||||
core.debug(`lockfilePathSha: ${lockfilePathSha}`)
|
||||
const environments = sha256(options.environments?.join(' ') ?? '')
|
||||
core.debug(`environments: ${environments}`)
|
||||
// since the lockfile path is not necessarily absolute, we need to include the cwd in the cache key
|
||||
const cwdSha = sha256(process.cwd())
|
||||
core.debug(`cwdSha: ${cwdSha}`)
|
||||
const sha = sha256(lockfileSha + pixiSha + lockfilePathSha + cwdSha)
|
||||
const sha = sha256(lockfileSha + environments + pixiSha + lockfilePathSha + cwdSha)
|
||||
core.debug(`sha: ${sha}`)
|
||||
return `${cacheKeyPrefix}${getCondaArch()}-${sha}`
|
||||
})
|
||||
|
||||
+41
-3
@@ -54,12 +54,49 @@ const pixiInstall = async () => {
|
||||
return Promise.resolve()
|
||||
}
|
||||
return tryRestoreCache()
|
||||
.then((_cacheKey) =>
|
||||
execute(pixiCmd(`install${options.frozen ? ' --frozen' : ''}${options.locked ? ' --locked' : ''}`))
|
||||
)
|
||||
.then(async (_cacheKey) => {
|
||||
if (options.environments) {
|
||||
for (const environment of options.environments) {
|
||||
core.debug(`Installing environment ${environment}`)
|
||||
const command = `install -e ${environment}${options.frozen ? ' --frozen' : ''}${
|
||||
options.locked ? ' --locked' : ''
|
||||
}`
|
||||
await core.group(`pixi ${command}`, () => execute(pixiCmd(command)))
|
||||
}
|
||||
} else {
|
||||
const command = `install${options.frozen ? ' --frozen' : ''}${options.locked ? ' --locked' : ''}`
|
||||
return core.group(`pixi ${command}`, () => execute(pixiCmd(command)))
|
||||
}
|
||||
})
|
||||
.then(saveCache)
|
||||
}
|
||||
|
||||
const generateList = async () => {
|
||||
if (!options.runInstall) {
|
||||
core.debug('Skipping pixi list.')
|
||||
return Promise.resolve()
|
||||
}
|
||||
if (
|
||||
'version' in options.pixiSource &&
|
||||
options.pixiSource.version !== 'latest' &&
|
||||
options.pixiSource.version < 'v0.13.0'
|
||||
) {
|
||||
core.warning(
|
||||
'pixi list is not supported for pixi versions < `v0.13.0`. Please set `pixi-version` to `v0.13.0` or later.'
|
||||
)
|
||||
return Promise.resolve()
|
||||
}
|
||||
if (options.environments) {
|
||||
for (const environment of options.environments) {
|
||||
core.debug(`Listing environment ${environment}`)
|
||||
await core.group(`pixi list -e ${environment}`, () => execute(pixiCmd(`list -e ${environment}`)))
|
||||
}
|
||||
return Promise.resolve()
|
||||
} else {
|
||||
return core.group('pixi list', () => execute(pixiCmd('list')))
|
||||
}
|
||||
}
|
||||
|
||||
const generateInfo = () => core.group('pixi info', () => execute(pixiCmd('info')))
|
||||
|
||||
const run = async () => {
|
||||
@@ -70,6 +107,7 @@ const run = async () => {
|
||||
await pixiLogin()
|
||||
await pixiInstall()
|
||||
await generateInfo()
|
||||
await generateList()
|
||||
}
|
||||
|
||||
run().catch((error) => {
|
||||
|
||||
+24
-5
@@ -6,12 +6,13 @@ import * as core from '@actions/core'
|
||||
import * as z from 'zod'
|
||||
import untildify from 'untildify'
|
||||
|
||||
type Inputs = {
|
||||
type Inputs = Readonly<{
|
||||
pixiVersion?: string
|
||||
pixiUrl?: string
|
||||
logLevel?: LogLevel
|
||||
manifestPath?: string
|
||||
runInstall?: boolean
|
||||
environments?: string[]
|
||||
frozen?: boolean
|
||||
locked?: boolean
|
||||
cache?: boolean
|
||||
@@ -24,7 +25,7 @@ type Inputs = {
|
||||
authPassword?: string
|
||||
authCondaToken?: string
|
||||
postCleanup?: boolean
|
||||
}
|
||||
}>
|
||||
|
||||
export type PixiSource =
|
||||
| {
|
||||
@@ -60,6 +61,7 @@ export type Options = Readonly<{
|
||||
manifestPath: string
|
||||
pixiLockFile: string
|
||||
runInstall: boolean
|
||||
environments?: string[]
|
||||
frozen: boolean
|
||||
locked: boolean
|
||||
cache?: Cache
|
||||
@@ -100,6 +102,18 @@ const parseOrUndefinedJSON = <T>(key: string, schema: z.ZodSchema<T>): T | undef
|
||||
return schema.parse(JSON.parse(input))
|
||||
}
|
||||
|
||||
const parseOrUndefinedList = <T>(key: string, schema: z.ZodSchema<T>): T[] | undefined => {
|
||||
const input = core.getInput(key)
|
||||
// GitHub actions sets empty inputs to the empty string, but we want undefined
|
||||
if (input === '') {
|
||||
return undefined
|
||||
}
|
||||
return input
|
||||
.split(' ')
|
||||
.map((s) => schema.parse(s))
|
||||
.filter((s) => s !== '')
|
||||
}
|
||||
|
||||
const validateInputs = (inputs: Inputs): void => {
|
||||
if (inputs.pixiVersion && inputs.pixiUrl) {
|
||||
throw new Error('You need to specify either pixi-version or pixi-url')
|
||||
@@ -139,8 +153,8 @@ const validateInputs = (inputs: Inputs): void => {
|
||||
throw new Error('You need to specify auth-host')
|
||||
}
|
||||
}
|
||||
if (inputs.cacheWrite && !inputs.cacheKey && !inputs.cache) {
|
||||
throw new Error('cache-write is only valid with cache-key or cache specified.')
|
||||
if (inputs.runInstall === false && inputs.environments) {
|
||||
throw new Error('Cannot specify environments without running install')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,10 +170,13 @@ const inferOptions = (inputs: Inputs): Options => {
|
||||
const pixiLockFile = path.join(path.dirname(manifestPath), path.basename(manifestPath).replace(/\.toml$/, '.lock'))
|
||||
const lockFileAvailable = existsSync(pixiLockFile)
|
||||
core.debug(`lockFileAvailable: ${lockFileAvailable}`)
|
||||
if (!lockFileAvailable && inputs.cacheWrite === true) {
|
||||
throw new Error('You cannot specify cache-write = true without a lock file present')
|
||||
}
|
||||
const cache = inputs.cacheKey
|
||||
? { cacheKeyPrefix: inputs.cacheKey, cacheWrite: inputs.cacheWrite ?? true }
|
||||
: inputs.cache === true || (lockFileAvailable && inputs.cache !== false)
|
||||
? { cacheKeyPrefix: 'pixi-', cacheWrite: true }
|
||||
? { cacheKeyPrefix: 'pixi-', cacheWrite: inputs.cacheWrite ?? true }
|
||||
: undefined
|
||||
const pixiBinPath = inputs.pixiBinPath ? path.resolve(untildify(inputs.pixiBinPath)) : PATHS.pixiBin
|
||||
const frozen = inputs.frozen ?? false
|
||||
@@ -188,6 +205,7 @@ const inferOptions = (inputs: Inputs): Options => {
|
||||
manifestPath,
|
||||
pixiLockFile,
|
||||
runInstall,
|
||||
environments: inputs.environments,
|
||||
frozen,
|
||||
locked,
|
||||
cache,
|
||||
@@ -221,6 +239,7 @@ const getOptions = () => {
|
||||
),
|
||||
manifestPath: parseOrUndefined('manifest-path', z.string()),
|
||||
runInstall: parseOrUndefinedJSON('run-install', z.boolean()),
|
||||
environments: parseOrUndefinedList('environments', z.string()),
|
||||
locked: parseOrUndefinedJSON('locked', z.boolean()),
|
||||
frozen: parseOrUndefinedJSON('frozen', z.boolean()),
|
||||
cache: parseOrUndefinedJSON('cache', z.boolean()),
|
||||
|
||||
@@ -78,6 +78,7 @@ export const pixiCmd = (command: string, withManifestPath = true) => {
|
||||
if (withManifestPath) {
|
||||
commandArray = commandArray.concat(['--manifest-path', options.manifestPath])
|
||||
}
|
||||
commandArray = commandArray.concat(['--color', 'always'])
|
||||
switch (options.logLevel) {
|
||||
case 'vvv':
|
||||
commandArray = commandArray.concat(['-vvv'])
|
||||
|
||||
+1105
-899
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
description = "Add a short description here"
|
||||
authors = ["Pavel Zwerschke <pavelzw@gmail.com>"]
|
||||
channels = ["conda-forge"]
|
||||
platforms = ["linux-64", "osx-64", "win-64"]
|
||||
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
|
||||
|
||||
[tasks]
|
||||
test = "python -c 'print(\"Hello world!\")'"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
[project]
|
||||
name = "test-package"
|
||||
channels = ["conda-forge"]
|
||||
platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
|
||||
|
||||
[dependencies]
|
||||
python = ">=3.11"
|
||||
pip = "*"
|
||||
polars = ">=0.14.24,<0.21"
|
||||
|
||||
[feature.py311.dependencies]
|
||||
python = "3.11.*"
|
||||
[feature.py312.dependencies]
|
||||
python = "3.12.*"
|
||||
|
||||
[environments]
|
||||
py311 = ["py311"]
|
||||
py312 = ["py312"]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
||||
[project]
|
||||
name = "test-default"
|
||||
version = "0.1.0"
|
||||
description = "Add a short description here"
|
||||
authors = ["Pavel Zwerschke <pavelzw@gmail.com>"]
|
||||
channels = ["conda-forge"]
|
||||
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
|
||||
|
||||
[tasks]
|
||||
test = "python -c 'print(\"Hello world!\")'"
|
||||
|
||||
[dependencies]
|
||||
python = "3.11.*"
|
||||
Reference in New Issue
Block a user