Skip to content

Commit

Permalink
chore(test runner): document that --only-changed on CI needs history (#…
Browse files Browse the repository at this point in the history
…32461)

Closes #32452

`--only-changed=$GITHUB_BASE_REF` needs the base ref available locally
to work properly. `fetch-depth: 0` does that, see
https://github.com/actions/checkout?tab=readme-ov-file#fetch-all-history-for-all-tags-and-branches.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
  • Loading branch information
Skn0tt and dgozman committed Sep 5, 2024
1 parent a8139b5 commit 0a49c05
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/src/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Force a non-shallow checkout, so that we can reference $GITHUB_BASE_REF.
# See https://github.com/actions/checkout for more details.
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
Expand Down Expand Up @@ -1044,4 +1048,4 @@ xvfb-run mvn test
```
```bash csharp
xvfb-run dotnet test
```
```

0 comments on commit 0a49c05

Please sign in to comment.