-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (39 loc) · 1.33 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
run: |
sudo apt-get -q update
sudo apt-get -q install -y jq zip unzip curl
git fetch --tags origin
- name: Tests
run: |
./test/suite/test.sh "$PWD"
- name: Check Docs
run: |
./doc/generate-docs.sh "$PWD"
# "Only a single line diff in EXMAPLES.md is allowed due to non-constant HTTP Date Header."
EXPECTED_DIFF="$(echo -e "1\t1\tEXAMPLES.md")"
# We need to use tabs here, as otherwise the test below would fail.
if [ "$(git diff --numstat 2>/dev/null)" == "$EXPECTED_DIFF" ]; then
echo "Docs are up to date."
else
echo "The autogenerated docs are not up to date. Generated docs are different from what is commited."
echo "Please run "
echo " doc/generate-docs.sh \"\$PWD\""
echo "locally, inspect the diff and commit them if they are OK."
echo "================ Git Diff (short) =================="
git diff --numstat
echo "================ Git Diff (long) =================="
git diff
exit 1
fi