Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/pixi-broken-package-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Pixi Broken Package Check

on:
pull_request:
branches:
- main
paths:
- 'environments/analysis3/pixi.toml'
- 'environments/analysis3/pixi.lock'

permissions:
contents: read
pull-requests: write

jobs:
pixi-broken-package-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
.github/workflows/pixi-broken-package-check.yml
environments/analysis3/pixi.toml
environments/analysis3/pixi.lock
scripts/check_broken_packages.py
sparse-checkout-cone-mode: false

- name: Generate broken package report
id: report
working-directory: ./environments/analysis3
env:
GITHUB_OUTPUT_PATH: /tmp/github-output.txt
run: |
python3 ../../scripts/check_broken_packages.py \
--pixi-toml pixi.toml \
--lockfile pixi.lock \
--markdown-output /tmp/broken-packages.md \
--github-output ${GITHUB_OUTPUT_PATH}
cat ${GITHUB_OUTPUT_PATH} >> "$GITHUB_OUTPUT"

- name: Comment broken package report on PR
if: always()
uses: access-nri/actions/.github/actions/comment@main
with:
number: ${{ github.event.pull_request.number }}
label: pixi-broken-package-check
message-file: /tmp/broken-packages.md

- name: Fail on broken package mismatch
if: steps.report.outputs.violations == 'true'
run: |
echo 'Broken-label packages in pixi.lock do not match pixi.toml declarations.'
exit 1
Loading
Loading