Nieuwe content voor Ontwerp-hoofdstuk #231
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| GO_VERSION: 1.25.5 | |
| HUGO_VERSION: 0.154.4 | |
| HTMLTEST_VERSION: 0.17.0 | |
| TZ: Europe/Amsterdam | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Render Mermaid SVGs | |
| run: npm run render-mermaid | |
| - name: Verify rendered SVGs exist | |
| run: | | |
| count=$(find static/images/render -name '*.svg' 2>/dev/null | wc -l) | |
| echo "Gevonden: ${count} SVG-bestanden" | |
| if [ "$count" -eq 0 ]; then | |
| echo "::error::Geen SVGs gegenereerd — controleer render-mermaid script" | |
| exit 1 | |
| fi | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: false | |
| - name: Install Hugo | |
| if: github.event.action != 'closed' | |
| run: | | |
| curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.tar.gz" | |
| mkdir -p "${HOME}/.local/hugo" | |
| tar -C "${HOME}/.local/hugo" -xf "hugo_${HUGO_VERSION}_linux-amd64.tar.gz" | |
| rm "hugo_${HUGO_VERSION}_linux-amd64.tar.gz" | |
| echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}" | |
| - name: Install htmltest | |
| run: | | |
| curl -sLJO "https://github.com/wjdp/htmltest/releases/download/v${HTMLTEST_VERSION}/htmltest_${HTMLTEST_VERSION}_linux_amd64.tar.gz" | |
| mkdir -p "${HOME}/.local/htmltest" | |
| tar -C "${HOME}/.local/htmltest" -xf "htmltest_${HTMLTEST_VERSION}_linux_amd64.tar.gz" | |
| rm "htmltest_${HTMLTEST_VERSION}_linux_amd64.tar.gz" | |
| echo "${HOME}/.local/htmltest" >> "${GITHUB_PATH}" | |
| - name: Verify installations | |
| run: | | |
| echo "Go: $(go version)" | |
| echo "Hugo: $(hugo version)" | |
| echo "htmltest: $(htmltest --version)" | |
| - name: Build site | |
| run: hugo --gc --minify --logLevel warning | |
| - name: Test links | |
| run: hugo --minify --quiet --baseURL / --destination .htmltest/public && htmltest |