Skip to content

Commit 07b5a5a

Browse files
committed
add to workflow
1 parent af5faee commit 07b5a5a

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/pull-request.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,35 @@ jobs:
7777
- name: Run Linter
7878
run: yarn run lint
7979

80+
test-provider-api-docs:
81+
name: Test Provider API Docs
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: Install Node
85+
uses: actions/setup-node@v4
86+
with:
87+
node-version: "23.x"
88+
89+
- name: Install Go
90+
uses: actions/setup-go@v5
91+
with:
92+
go-version: 1.23.x
93+
94+
- name: Install Hugo
95+
uses: peaceiris/actions-hugo@v3
96+
with:
97+
hugo-version: "0.135.0"
98+
extended: true
99+
100+
- name: Check out branch
101+
uses: actions/checkout@v4
102+
103+
- name: Yarn Install
104+
run: yarn install
105+
106+
- name: Run Provider Tests
107+
run: ./scripts/ci/run-provider-tests.sh
108+
80109
# Preview runs a registry build into a commit specific S3 bucket to preview changes.
81110
#
82111
# A link to the generated build is appended to the PR on each commit.

scripts/ci/run-provider-tests.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -o errexit -o pipefail
4+
5+
# runs on script exit to stop hugo server (whether successful or not)
6+
trap 'pkill -f "make serve" || true' EXIT
7+
8+
pushd tools/resourcedocsgen
9+
go build -o "${GOPATH}/bin/resourcedocsgen" .
10+
popd
11+
12+
resourcedocsgen docs --schemaFile scripts/tests/schema.json \
13+
--version 1.0.0 \
14+
--docsOutDir themes/default/content/registry/packages/test-provider/api-docs \
15+
--packageTreeJSONOutDir "themes/default/static/registry/packages/navs"
16+
17+
make serve &
18+
19+
sleep 10
20+
21+
./scripts/run-browser-tests.sh "http://localhost:1313" "test-provider-api-docs.cy.js"

0 commit comments

Comments
 (0)