Repository navigation
73 lines (66 loc) · 3.06 KB
/
Copy pathtest.yml
File metadata and controls
73 lines (66 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: build documentation
on: [push, pull_request]
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # need to fetch all history to ensure correct Git revision dates in docs
- name: set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
- name: Codespell action
uses: codespell-project/actions-codespell@22ff5a2e4b591290baf82d47c9feadac31c65441 # v1.0
with:
check_filenames: true
# MarkDown files in docs/available_software/detail are skipped because they are auto-generated
skip: '*.pdf,.git,*.json,./docs/available_software/detail/*.md,./docs/available_software_riscv/detail/*.md'
ignore_words_list: Fram,fram,ND,nd,Linz,IST
# - name: Markdown Linting Action
# uses: avto-dev/[email protected]
# with:
# rules: '/lint/rules/changelog.js'
# config: '/lint/config/changelog.yml'
# args: '.'
# Make sure to also test deployment of auto-generated API docs for test suite
# For that, we need the repo to be available under eessi/test-suite
- name: checkout test suite
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: eessi/test-suite
# Path is needed, otherwise this will overwrite the checkout action that cloned the docs repo
path: test-suite/test-suite
- name: Generate docs for latest release
run: |
cd test-suite/test-suite
# Make sure to fetch tags, so we can checkout a particular release
git fetch --tags
# This assumes we stick to a version-tagging scheme vX.Y.Z
LATEST_VERSION=$(git tag | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$' | sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -1)
# Use the latest release by default
git checkout $LATEST_VERSION
git branch
- name: install mkdocs + plugins
run: |
pip install -r requirements.txt
pip list | grep mkdocs
mkdocs --version
- name: build tutorial
run: make test
# The disclaimer is injected by overrides/partials/copyright.html, which
# depends on mkdocs-material including that partial in the page footer. A
# theme update that drops the include leaves the build green but silently
# removes the disclaimer, so assert it reaches every rendered post.
- name: check blog post disclaimer is rendered
run: |
posts=$(find site/blog -name index.html | grep -cE "/blog/20[0-9]{2}/[0-9]{2}/[0-9]{2}/")
marked=$(grep -rl data-eessi-blog-disclaimer site/blog --include=index.html | grep -cE "/blog/20[0-9]{2}/[0-9]{2}/[0-9]{2}/")
echo "blog posts: $posts, with disclaimer: $marked"
test "$posts" -gt 0
test "$posts" -eq "$marked"