Skip to content

Commit 9b9f17d

Browse files
committed
ci: add ci tests for web app builds
1 parent 154075e commit 9b9f17d

4 files changed

Lines changed: 85 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,33 @@ jobs:
3131
3232
- name: Run ${{ matrix.command }}
3333
run: yarn ${{ matrix.command }}
34+
35+
test-builds:
36+
name: Test Builds
37+
runs-on: ubuntu-latest
38+
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
app:
43+
- docs:
44+
command: "yarn run docs:generate"
45+
path: "./apps/docs"
46+
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Setup Node.js
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: 22
55+
cache: "yarn"
56+
57+
- name: Initialize Repository
58+
run: |
59+
yarn run init
60+
61+
- name: Build ${{ matrix.app }}
62+
working-directory: ${{ matrix.app.path }}
63+
run: ${{ matrix.app.command }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22
source .env
3-
source ${BASH_SOURCE%/*}/content
3+
source ${BASH_SOURCE%/*}/pdf-content
44

55
DOCS_ENV_PDF=1 BUILD_LATEST=false ./scripts/generate.sh
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
source .env
3+
4+
extensions=$(find $EXTENSIONS_DIR -name documentation.yaml | awk -F'/' '{print $(NF-1)}' | paste -sd' ' -)
5+
files=(
6+
"title"
7+
"whatis"
8+
"copyright"
9+
"versions"
10+
"requirements"
11+
"contact"
12+
"sample"
13+
"tutorial1"
14+
"tutorial2"
15+
"tutorial3"
16+
"interface"
17+
"interfacetab"
18+
"infotab"
19+
"codetab"
20+
"programming"
21+
"netlogo7intro"
22+
"netlogopreferences"
23+
"transition"
24+
"extension-manager"
25+
"shapes"
26+
"behaviorspace"
27+
"systemdynamics"
28+
"colorpicker"
29+
"hubnet"
30+
"hubnet-authoring"
31+
"modelingcommons"
32+
"logging"
33+
"controlling"
34+
"mathematica"
35+
"3d"
36+
"hpc"
37+
"extensions"
38+
"extension-authoring"
39+
"colorpicker"
40+
"netlogo7intro"
41+
"netlogopreferences"
42+
)
43+
for ext in $extensions; do
44+
files+=("$ext")
45+
done
46+
files+=("faq" "dictionary")
47+
48+
routes=()
49+
for f in "${files[@]}"; do
50+
routes+=("/$f")
51+
done
52+
53+
export NITRO_PRERENDER_ROUTES=$(IFS=,; echo "${routes[*]}")

apps/docs/scripts/generate-manual/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ done
2828

2929
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3030

31-
source ${BASH_SOURCE%/*}/content
31+
source ${BASH_SOURCE%/*}/pdf-content
3232
extensionCount=$(echo $extensions | wc -w | tr -d ' ')
3333
log "💡 Found $extensionCount extensions."
3434
log ""

0 commit comments

Comments
 (0)