File tree 2 files changed +38
-0
lines changed
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 55
55
- uses : actions/checkout@v3
56
56
- name : Run theme regression tests
57
57
run : tests/theme_regression.sh
58
+
59
+ bat_ci_compliance :
60
+ name : Bat CI Compliance
61
+ continue-on-error : true
62
+ runs-on : ubuntu-latest
63
+ timeout-minutes : 10
64
+ steps :
65
+ - uses : actions/checkout@v3
66
+ - name : Check bat CI compliance
67
+ run : scripts/check_bat_ci_compliance.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ theirs=https://raw.githubusercontent.com/sharkdp/bat/refs/heads/master/tests/syntax-tests/highlighted/cmd-help/test.cmd-help
4
+ ours=tests/highlighted/bat-short-0.22.1.txt
5
+ theirs_copy=/tmp/bat-regression-test.cmd-help
6
+ ours_basename=$( basename $ours )
7
+
8
+ cd " $( dirname " ${BASH_SOURCE[0]} " ) " || exit 9
9
+
10
+ # Fetch regression test from `bat`
11
+ curl --location --output $theirs_copy $theirs & > /dev/null
12
+ curl_exit_status=$?
13
+ if [ $curl_exit_status -ne 0 ]; then
14
+ echo " could not fetch the bat regression test, curl failed with code $curl_exit_status ."
15
+ exit 1
16
+ fi
17
+
18
+ # check compliance with our regression test in bat CI
19
+ if ! diff ../$ours $theirs_copy ; then
20
+ cat << EOF
21
+ ::warning file=$ours ,title=Would fail bat CI::\
22
+ The highlight changes to $ours_basename would fail CI in the bat project. For more details, see: \
23
+ https://github.com/victor-gp/cmd-help-sublime-syntax/wiki/How-to-manually-bump-cmd%E2%80%90help-version-in-bat%27s-submodules
24
+ EOF
25
+ exit 1
26
+ else
27
+ echo " ok: $ours matches the version for bat CI"
28
+ fi
You can’t perform that action at this time.
0 commit comments