Skip to content

Commit 6cbf6c9

Browse files
authored
Merge pull request #768 from squeek502/ci-check-docs-gen
ci: Add check that docs.md and meta.lua are up-to-date
2 parents 83adae7 + 8732ab5 commit 6cbf6c9

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.ci/check_docs.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
lua docgen.lua
6+
7+
git diff --quiet -- docs.md
8+
git diff --quiet -- meta.lua

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ jobs:
1414
- name: Docs
1515
run: ./.ci/docscov.sh
1616

17+
docs-gen:
18+
runs-on: ubuntu-latest
19+
env:
20+
BUILD_TYPE: Debug
21+
WITH_LUA_ENGINE: Lua
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
submodules: recursive
26+
- name: Build Lua
27+
run: make
28+
- name: Setup Path
29+
run: echo "${{github.workspace}}/build" >> $GITHUB_PATH
30+
- name: Check Docs
31+
run: ./.ci/check_docs.sh
32+
1733
clang-asan:
1834
runs-on: ubuntu-latest
1935
env:
@@ -151,7 +167,7 @@ jobs:
151167
152168
deploy:
153169
if: startsWith(github.ref, 'refs/tags/')
154-
needs: [build, minimum-supported-libuv, process-cleanup-test, valgrind, clang-asan, bindings-coverage]
170+
needs: [build, minimum-supported-libuv, process-cleanup-test, valgrind, clang-asan, bindings-coverage, docs-gen]
155171
runs-on: ubuntu-latest
156172
env:
157173
WITH_LUA_ENGINE: LuaJIT

docs.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ end
163163
local function cb_err(args, optional, desc)
164164
return cb({
165165
{ 'err', opt_str },
166-
unpack(args or {}),
166+
(_G.table.unpack or unpack)(args or {}),
167167
}, optional, desc)
168168
end
169169

0 commit comments

Comments
 (0)