Skip to content

Commit 6011676

Browse files
committed
Run generated docs checks on changes to md files too
1 parent 71b92bc commit 6011676

File tree

2 files changed

+78
-28
lines changed

2 files changed

+78
-28
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
19+
name: Generated Docs Check
20+
21+
concurrency:
22+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
23+
cancel-in-progress: true
24+
25+
on:
26+
push:
27+
paths:
28+
- ".github/**"
29+
- "datafusion/**"
30+
- "dev/update_config_docs.sh"
31+
- "dev/update_function_docs.sh"
32+
- "docs/source/user-guide/configs.md"
33+
- "docs/source/user-guide/sql/aggregate_functions.md"
34+
- "docs/source/user-guide/sql/scalar_functions.md"
35+
- "docs/source/user-guide/sql/window_functions.md"
36+
pull_request:
37+
paths:
38+
- ".github/**"
39+
- "datafusion/**"
40+
- "dev/update_config_docs.sh"
41+
- "dev/update_function_docs.sh"
42+
- "docs/source/user-guide/configs.md"
43+
- "docs/source/user-guide/sql/aggregate_functions.md"
44+
- "docs/source/user-guide/sql/scalar_functions.md"
45+
- "docs/source/user-guide/sql/window_functions.md"
46+
# manual trigger
47+
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
48+
workflow_dispatch:
49+
50+
51+
generated-docs-check:
52+
name: check configs.md and ***_functions.md is up-to-date
53+
needs: linux-build-lib
54+
runs-on: ubuntu-latest
55+
container:
56+
image: amd64/rust
57+
steps:
58+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
with:
60+
submodules: true
61+
fetch-depth: 1
62+
- name: Setup Rust toolchain
63+
uses: ./.github/actions/setup-builder
64+
with:
65+
rust-version: stable
66+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
67+
with:
68+
node-version: "20"
69+
- name: Check if configs.md has been modified
70+
run: |
71+
# If you encounter an error, run './dev/update_config_docs.sh' and commit
72+
./dev/update_config_docs.sh
73+
git diff --exit-code
74+
- name: Check if any of the ***_functions.md has been modified
75+
run: |
76+
# If you encounter an error, run './dev/update_function_docs.sh' and commit
77+
./dev/update_function_docs.sh
78+
git diff --exit-code

.github/workflows/rust.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -702,34 +702,6 @@ jobs:
702702
- name: Check Cargo.toml formatting
703703
run: taplo format --check
704704

705-
config-docs-check:
706-
name: check configs.md and ***_functions.md is up-to-date
707-
needs: linux-build-lib
708-
runs-on: ubuntu-latest
709-
container:
710-
image: amd64/rust
711-
steps:
712-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
713-
with:
714-
submodules: true
715-
fetch-depth: 1
716-
- name: Setup Rust toolchain
717-
uses: ./.github/actions/setup-builder
718-
with:
719-
rust-version: stable
720-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
721-
with:
722-
node-version: "20"
723-
- name: Check if configs.md has been modified
724-
run: |
725-
# If you encounter an error, run './dev/update_config_docs.sh' and commit
726-
./dev/update_config_docs.sh
727-
git diff --exit-code
728-
- name: Check if any of the ***_functions.md has been modified
729-
run: |
730-
# If you encounter an error, run './dev/update_function_docs.sh' and commit
731-
./dev/update_function_docs.sh
732-
git diff --exit-code
733705

734706
# Verify MSRV for the crates which are directly used by other projects:
735707
# - datafusion

0 commit comments

Comments
 (0)