summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2023-07-11 04:34:26 +0200
committerNico Williams <nico@cryptonector.com>2023-07-11 00:24:50 -0500
commit83d4dd16adfced4a600c36aceb488adf5a2a539e (patch)
treed0b0c2e43962de7e3220e567b5fa5407daa7d6b5 /.github
parent4ff63d9365c609caea5a181d31a019907a3e552a (diff)
Add CI workflow to make sure the man page and man.test can be built
And that man.test is up to date.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/manpage.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/manpage.yml b/.github/workflows/manpage.yml
new file mode 100644
index 00000000..db84c629
--- /dev/null
+++ b/.github/workflows/manpage.yml
@@ -0,0 +1,40 @@
+name: Building man page and man.test
+on:
+ push:
+ paths:
+ - '.github/workflows/manpage.yml'
+ - 'docs/**'
+ - 'tests/man.test'
+ - 'jq.1.prebuilt'
+
+jobs:
+ manpages:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.11'
+ cache: pipenv
+ - name: Install pipenv
+ run: pip install pipenv
+ - name: Install dependencies
+ run: pipenv sync
+ working-directory: docs
+ - name: Configure
+ run: |
+ autoreconf -i
+ ./configure --enable-docs
+ - name: Build man page and man.test
+ run: |
+ mv jq.1.prebuilt jq.1.old
+ rm -f tests/man.test
+ make jq.1.prebuilt tests/man.test
+ - name: Make sure that jq.1.prebuilt and man.test are up to date
+ run: |
+ git diff --exit-code tests/man.test
+ # skip build date in jq.1.prebuilt
+ test -s jq.1.prebuilt
+ diff -- <(tail -n +3 jq.1.old) <(tail -n +3 jq.1.prebuilt)