v2 / .github / workflows / docs_ci.yml
84 lines · 75 sloc · 2.58 KB · a51ed8416224e15d17196584165f9fae71ec613f
Raw
1name: Docs CI
2
3### Run on *EVERY* .v or .md related commit.
4### The documentation *SHOULD* stay valid, and the developers should receive
5### early warning, if they break it.
6
7on:
8 push:
9 paths-ignore:
10 - '**.yml'
11 - '!**/docs_ci.yml'
12 - 'cmd/tools/vrepl.v'
13 pull_request:
14 paths-ignore:
15 - '**.yml'
16 - '!**/docs_ci.yml'
17 - 'cmd/tools/vrepl.v'
18
19concurrency:
20 group: docs-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
21 cancel-in-progress: true
22
23jobs:
24 check-markdown:
25 runs-on: ubuntu-24.04
26 timeout-minutes: 20
27 steps:
28 - uses: actions/checkout@v6
29 - uses: ./.github/actions/cache-apt-packages-action
30 - name: Build V
31 run: make
32 - name: Install dependencies (some examples show how to use sqlite and the x11 clipboard)
33 run: ./v retry -- sudo apt install --quiet -y libx11-dev libssl-dev sqlite3 libsqlite3-dev
34 - name: Check markdown line length & code examples
35 run: ./v check-md -hide-warnings .
36 ## NB: -hide-warnings is used here, so that the output is less noisy,
37 ## thus real errors are easier to spot.
38
39 report-missing-fn-doc:
40 runs-on: ubuntu-24.04
41 timeout-minutes: 5
42 env:
43 MOPTIONS: --diff --deprecated --relative-paths --exclude /vlib/v/ --exclude /vlib/v2/ --exclude /builtin/linux_bare/ --exclude /testdata/ --exclude /tests/ --exclude /vlib/sokol/ --exclude /vlib/x/
44 steps:
45 - uses: actions/checkout@v6
46 - name: Build V
47 run: make
48
49 - name: Checkout previous v
50 uses: actions/checkout@v6
51 with:
52 repository: vlang/v
53 ref: master
54 path: pv
55
56 - name: Check against parent commit
57 run: |
58 # shellcheck disable=SC2086
59 ./v missdoc $MOPTIONS pv/vlib vlib
60
61 report-missing-dots-in-doc-comments:
62 runs-on: ubuntu-24.04
63 timeout-minutes: 20
64 steps:
65 - uses: actions/checkout@v6
66 - name: Build V
67 run: make
68 - name: Check doc comment dots for some key modules
69 run: ./v run cmd/tools/find_doc_comments_with_no_dots.v \
70 vlib/builtin/ vlib/arrays/ vlib/flag/ \
71 vlib/bitfield/ vlib/term/ vlib/strings/ \
72 vlib/rand/ vlib/compress/ vlib/clipboard/ \
73 vlib/time/ \
74 vlib/os
75
76 report-wrong-examples-in-doc-comments:
77 runs-on: ubuntu-24.04
78 timeout-minutes: 20
79 steps:
80 - uses: actions/checkout@v6
81 - name: Build V
82 run: make
83 - name: Check examples in the doc comments for all vlib modules
84 run: VJOBS=1 ./v doc -check-examples -f none vlib/
85