35 lines
970 B
YAML
35 lines
970 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Keep LF line endings
|
|
run: git config --global core.autocrlf false
|
|
- uses: actions/checkout@v4
|
|
- run: cargo fmt --check
|
|
- run: cargo clippy --all-targets -- -D warnings
|
|
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
# Windows images ship core.autocrlf=true in the *system* gitconfig:
|
|
# without this override the checkout rewrites LF fixtures to CRLF and
|
|
# 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
|
|
- run: cargo test --locked --no-fail-fast
|