diff options
author | Patrick Pichler <git@patrickpichler.dev> | 2021-10-28 13:52:59 +0200 |
---|---|---|
committer | Patrick Pichler <git@patrickpichler.dev> | 2022-03-10 20:55:11 +0100 |
commit | 6b660ef63a94154c0e0ce05ae898b3283c090c4b (patch) | |
tree | 794c8f0651a0315cd1ae279ef3c6f892dc289128 /.github | |
parent | 5ed64444e3fea234a5a4145b15aeb2f7b6319f1f (diff) |
Add test for systemwide config file support
There is now a new stage in the CICD workflow present, which will build
`bat` with the `BAT_SYSTEM_CONFIG_PREFIX` set to load the config file
from `/tests/examples/system_config/bat/config`, plus a basic set of
tests, to ensure the feature is working as expected. By default the
tests are set to ignored, as they need special setup before they can be
run.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/CICD.yml | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 124c7e31..710bd4f2 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -96,7 +96,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --locked --release -- --ignored + args: --locked --release --test assets -- --ignored - name: Syntax highlighting regression test run: tests/syntax-tests/regression_test.sh - name: List of languages @@ -106,6 +106,32 @@ jobs: - name: Test custom assets run: tests/syntax-tests/test_custom_assets.sh + test_with_system_config: + name: Run tests with system wide configuration + runs-on: ubuntu-20.04 + steps: + - name: Git checkout + uses: actions/checkout@v2 + - name: Prepare environment variables + run: | + echo "BAT_SYSTEM_CONFIG_PREFIX=$GITHUB_WORKSPACE/tests/examples/system_config" >> $GITHUB_ENV + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + default: true + profile: minimal + - name: Build and install bat + uses: actions-rs/cargo@v1 + with: + command: install + args: --locked --path . + - name: Run unit tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --locked --test system_wide_config -- --ignored + documentation: name: Documentation runs-on: ubuntu-20.04 |