Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3e0de0

Browse files
committed
TST: add test that pixi lock file is consistent with pyproject.toml [ci doc]
1 parent 85257fe commit f3e0de0

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

.github/workflows/pixi_tests.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,39 @@ on:
2222
permissions: {}
2323

2424
jobs:
25+
check-lockfile:
26+
runs-on: ubuntu-24.04
27+
permissions:
28+
contents: read
29+
30+
steps:
31+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
32+
with:
33+
fetch-depth: 0
34+
persist-credentials: false
35+
36+
- name: Set up pixi
37+
uses: prefix-dev/[email protected]
38+
with:
39+
pixi-version: v0.66.0
40+
run-install: false
41+
42+
- name: Check that pixi.lock is up to date
43+
run: |
44+
if ! pixi install --locked --manifest-path pyproject.toml; then
45+
echo "::error file=pixi.lock::pixi.lock is not consistent with pyproject.toml. " \
46+
"Run 'pixi lock' locally and commit the updated pixi.lock."
47+
exit 1
48+
fi
49+
2550
pixi-linux-install:
51+
needs: check-lockfile
2652
runs-on: ubuntu-24.04
2753
permissions:
2854
contents: read
2955

3056
steps:
31-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
3258
with:
3359
fetch-depth: 0
3460
persist-credentials: false
@@ -40,15 +66,19 @@ jobs:
4066
locked: true
4167
cache: true
4268
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
69+
4370
- name: Show pixi info
4471
run: |
4572
pixi info
4673
pixi list
74+
4775
- name: Clean build artifacts
4876
run: |
4977
rm -rf build meson-logs meson-private .mesonpy-*
78+
5079
- name: Install Matplotlib editable
5180
run: pixi run python -m pip install --config-settings=setup-args="-Db_lto=false" --editable .
81+
5282
- name: Smoke test editable install
5383
run: |
5484
pixi run python -c "import matplotlib; print(matplotlib.__version__)"

0 commit comments

Comments
 (0)