Skip to content

Commit 58b4056

Browse files
committed
Update README
1 parent 0913a52 commit 58b4056

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

13+
env:
14+
PIXI_VERSION: "v0.63.0"
15+
1316
jobs:
1417
test:
1518
runs-on: ${{ matrix.os }}
@@ -32,6 +35,7 @@ jobs:
3235
uses: ./create-pixi-lock
3336
with:
3437
cache-frequency: ${{ matrix.cache-frequency }}
38+
pixi-version: ${{ env.PIXI_VERSION }}$
3539

3640
- name: Verify pixi.lock exists
3741
shell: bash
@@ -45,6 +49,9 @@ jobs:
4549
4650
- name: Setup pixi and install environment
4751
uses: prefix-dev/setup-pixi@v0.9.3
52+
with:
53+
pixi-version: ${{ env.PIXI_VERSION }}$
54+
4855

4956
- name: Verify environment installed
5057
shell: bash

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,47 @@
55
66
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.
77

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+
837
## Why not commit the lock file?
938

1039
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.
1140

1241
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.
1342

1443
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

Comments
 (0)