|
5 | 5 |
|
6 | 6 | This action creates a `pixi.lock` file and caches it for future use. Subsequent runs of this action on the same day restore the lock file instead of generating it anew. |
7 | 7 |
|
| 8 | + |
| 9 | +## Usage |
| 10 | + |
| 11 | +Basic usage with a set version of Pixi as well as daily cached lockfile: |
| 12 | + |
| 13 | +```yaml |
| 14 | +env: |
| 15 | + PIXI_VERSION: "v0.63.0" |
| 16 | + |
| 17 | +# ... |
| 18 | +steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - uses: Parcels-code/create-pixi-lock@v1 |
| 22 | + with: |
| 23 | + pixi-version: ${{ env.PIXI_VERSION }}$ # Default is latest |
| 24 | + cache-frequency: daily # options are "daily", "weekly", "monthly". Default "daily" |
| 25 | + - uses: prefix-dev/setup-pixi@v0.9.3 |
| 26 | + with: |
| 27 | + pixi-version: ${{ env.PIXI_VERSION }}$ |
| 28 | +``` |
| 29 | +
|
| 30 | +> [!NOTE] |
| 31 | +> Pinning your Pixi version in CI and updating this pin manually ensures better |
| 32 | +> Stability. Otherwise updates to Pixi which (a) change the format of the lock > file would break your CI for a period of `cache-frequency`, or (b) change the format of |
| 33 | +> `pixi.toml`, which would break your CI until you fix it. |
| 34 | +> This avoids any potentially breaking changes down the line (e.g., changes |
| 35 | +> in lock file behaviour |
| 36 | + |
8 | 37 | ## Why not commit the lock file? |
9 | 38 |
|
10 | 39 | Committing your lock file is considered good practice when working on application code. Providing fixed package versions results in perfect reproducibility of environments between machines, and hence also reproducibility of results. |
11 | 40 |
|
12 | 41 | When developing and testing _library_ code, we don't want our environments to stay completely fixed - we want to test against environments covering a wide range of package versions to ensure compatability, including an environment includ the latest available versions of packages. |
13 | 42 |
|
14 | 43 | The easiest way to test against the latest versions of packages - and avoid the noisy commit history (and additional overhead) of regularly updating a lock file in git - is instead to ignore the lock file and rely on developers and CI to generate their own lock files. This forgoes perfect reprodubility between developer machines, and with CI machines. |
| 44 | + |
| 45 | + |
| 46 | +## Dev notes |
| 47 | + |
| 48 | +### Release checklist |
| 49 | + |
| 50 | +- Update the `README.md` bumping the version of action |
| 51 | +- Cut release |
0 commit comments