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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,30 @@ permissions:
contents: read

jobs:
actionlint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Actionlint
uses: docker://rhysd/actionlint:1.7.12

test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check whitespace
run: |
set -euo pipefail
if [ "${{ github.event_name }}" = "pull_request" ]; then
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
git diff --check "origin/${{ github.base_ref }}...HEAD"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fetch enough history before triple-dot diff

On pull_request runs this uses origin/${{ github.base_ref }}...HEAD, but the preceding checkout still has the default shallow history: the checkout README documents fetch-depth defaulting to 1, and Git documents A...B as diffing from merge-base A B. In that shallow PR checkout Git cannot find the merge base even after fetching the base tip, so this step exits with fatal: ... no merge base and blocks the CI before tests run. Set fetch-depth: 0/fetch the merge base, or diff against an explicitly fetched base SHA.

Useful? React with 👍 / 👎.

else
git diff-tree --check --no-commit-id --root -r HEAD
fi
- uses: actions/setup-python@v6
with:
python-version: "3.12"
Expand Down
Loading