-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (42 loc) · 1.2 KB
/
tests.yml
File metadata and controls
51 lines (42 loc) · 1.2 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
name: Run tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
reason:
description: "Reason"
required: false
default: "Manual trigger"
jobs:
Tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install the project
run: uv sync
- name: Build
run: uv run mkdocs build --clean --strict -v
# Mkdocs generates a 404 file with absolute links to /docs/..., which is of course
# needed as it doesn't know which path the 404 page will be rendered for.
# However, `hyperlink` doesn't understand this absolute path so will always fail
# the link check for it.
# `hyperlink` doesn't yet have an option to ignore files, so we will remove it
# manually here.
- name: Remove 404 file
run: rm site/404.html
- name: Check links
uses: untitaker/hyperlink@0.2.0
with:
args: site/ --sources docs/