Skip to content

Commit

Permalink
CI: Run syntax regression tests from bat
Browse files Browse the repository at this point in the history
If bat master branch regression tests work with the syntect code under
test, that is a good indication that syntect work well.

Add such a check in CI.
  • Loading branch information
Enselic committed Oct 5, 2023
1 parent e9819fb commit 14ba51b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,28 @@ jobs:
- uses: actions/checkout@v3
- run: RUSTDOCFLAGS='--deny warnings' cargo doc --no-deps --document-private-items --all-features

bat-tests:
name: Run bat syntax regression tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: 'syntect'
- uses: actions/checkout@v3
with:
repository: 'sharkdp/bat'
path: 'bat'
ref: master
submodules: true
- name: bat/tests/syntax-tests/regression_test.sh
run: |
cd bat
sed -i 's%\[dependencies.syntect\]%[dependencies.syntect]\npath = "../syntect"%' Cargo.toml
cargo build --release # Build bat so we can update the assets
PATH=target/release:$PATH ./assets/create.sh # Update assets with newly built bat
cargo build --release # Build bat using the newly updated assets
PATH=./target/release:$PATH tests/syntax-tests/regression_test.sh
build-and-test:
name: Build and test
runs-on: ubuntu-latest
Expand Down

0 comments on commit 14ba51b

Please sign in to comment.