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

Skip to content

Commit 9bd10f5

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

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Check pixi lockfile
3+
# check that pixi.lock is consistent with pyproject.toml and ask user to
4+
# regenerate and commit if not.
5+
6+
on:
7+
pull_request:
8+
paths:
9+
- pyproject.toml
10+
- pixi.lock
11+
- .github/workflows/pixi-lock-check.yml
12+
push:
13+
branches: [main]
14+
paths:
15+
- pyproject.toml
16+
- pixi.lock
17+
- .github/workflows/pixi-lock-check.yml
18+
19+
jobs:
20+
check-lockfile:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up pixi
27+
uses: prefix-dev/[email protected]
28+
with:
29+
run-install: false
30+
manifest-path: pyproject.toml
31+
32+
- name: Check that pixi.lock is up to date
33+
run: |
34+
if ! pixi install --locked --manifest-path pyproject.toml; then
35+
echo "::error file=pixi.lock::pixi.lock is not consistent with pyproject.toml. Run 'pixi lock' locally and commit the updated pixi.lock."
36+
exit 1
37+
fi

0 commit comments

Comments
 (0)