From 14ba51b5dea3a7c4f88fb9db7569f113e023cdb4 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Wed, 4 Oct 2023 20:14:12 +0200 Subject: [PATCH] CI: Run syntax regression tests from bat 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. --- .github/workflows/CI.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7259f77..5b94251 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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