Skip to content

Commit cf12c80

Browse files
committed
chore(workflow): add schema-markdown-check job
1 parent e07c2d4 commit cf12c80

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,28 @@ jobs:
7878
go install
7979
cd ${{ github.workspace }}/terraform-provider-huaweicloud
8080
tfproviderlint -V011=false -V012=false -V013=false -V014=false -R019=false ./...
81+
82+
schema-markdown-check:
83+
runs-on: ubuntu-latest
84+
85+
steps:
86+
- uses: actions/checkout@v3
87+
- uses: actions/setup-go@v3
88+
with:
89+
go-version: ">=1.18"
90+
91+
- name: Check schemas and markdown docs
92+
shell: bash {0}
93+
run: |
94+
cd scripts/markdown_check
95+
go build -o markdown_check main.go
96+
./markdown_check >check_result.log
97+
98+
# There are three known issues for huaweicloud_mapreduce_cluster
99+
ret=$(($?-3))
100+
if [ $ret -gt 0 ]; then
101+
echo "ERROR: find $ret inconsistencies between schemas and markdown docs"
102+
echo "please ignore the errors in huaweicloud_mapreduce_cluster"
103+
grep -B1 "\[ERROR\]" check_result.log
104+
exit $ret
105+
if

0 commit comments

Comments
 (0)