ci: set core.autocrlf=false before checkout; windows images ship autocrlf=true in system gitconfig, which rewrote LF fixtures to CRLF and broke byte-span assertions
This commit is contained in:
parent
4f91cf4387
commit
7f568fd0c9
1 changed files with 8 additions and 7 deletions
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
|
|
@ -12,9 +12,9 @@ jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Keep LF line endings
|
||||||
|
run: git config --global core.autocrlf false
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
core.autocrlf: input
|
|
||||||
- run: cargo fmt --check
|
- run: cargo fmt --check
|
||||||
- run: cargo clippy --all-targets -- -D warnings
|
- run: cargo clippy --all-targets -- -D warnings
|
||||||
|
|
||||||
|
|
@ -25,10 +25,11 @@ jobs:
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
# core.autocrlf=input keeps the working tree LF on every OS: the
|
# Windows images ship core.autocrlf=true in the *system* gitconfig:
|
||||||
# span/byte-offset tests and the git rename assertions compare exact
|
# without this override the checkout rewrites LF fixtures to CRLF and
|
||||||
# fixture bytes.
|
# the span/byte-offset tests compare the wrong bytes. Global config
|
||||||
|
# outranks system, so it neutralizes the image default before checkout.
|
||||||
|
- name: Keep LF line endings
|
||||||
|
run: git config --global core.autocrlf false
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
core.autocrlf: input
|
|
||||||
- run: cargo test --locked --no-fail-fast
|
- run: cargo test --locked --no-fail-fast
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue