Skip to content
Merged
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
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ jobs:
PY
- name: Compare production source
env:
PR_BASE: ${{ github.event.pull_request.base.sha || inputs.base }}
# pull_request.base.sha is not refreshed when the base branch moves, so it can name a
# revision many commits behind and charge the PR for debt main introduced. The PR's own
# change starts at the merge-base with the base branch's current tip.
BASE_TIP: ${{ github.event.pull_request.base.ref && format('origin/{0}', github.event.pull_request.base.ref) || inputs.base }}
PR_HEAD: ${{ github.event.pull_request.head.sha || inputs.head }}
run: PYTHONPATH="$PWD/.core-ratchet/src" PATH="$PWD/.venv/bin:$PATH" .venv/bin/python .core-ratchet/tools/debt_ratchet.py --root src/toad --base "$PR_BASE" --head "$PR_HEAD"
run: PYTHONPATH="$PWD/.core-ratchet/src" PATH="$PWD/.venv/bin:$PATH" .venv/bin/python .core-ratchet/tools/debt_ratchet.py --root src/toad --base "$(git merge-base "$BASE_TIP" "$PR_HEAD")" --head "$PR_HEAD"
- name: Run surface guards
run: .venv/bin/pytest tests/guards
suite:
Expand Down
Loading