Skip to content

Commit

Permalink
Add some simple tests for the docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikalstill committed May 1, 2024
1 parent 4ae1ca9 commit 94a21db
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docs-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Documentation tests

# NOTE(mikal): git repos are checked out to /srv/github/_work/{repo}/{repo}
# which is available as GITHUB_WORKSPACE. You can find other environment
# variables at https://docs.github.com/en/actions/learn-github-actions/environment-variables

on:
pull_request:
branches:
- develop
- v*-releases
paths:
- 'docs/**'

jobs:
lint:
runs-on: self-hosted
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-lint
cancel-in-progress: true

steps:
- name: Checkout code with two commits
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Ensure the docs build
run: |
cd ${GITHUB_WORKSPACE}/shakenfist
/usr/bin/tox -edocs
zip site.zip site
- uses: actions/upload-artifact@v4
if: always()
with:
name: site.zip
retention-days: 90
if-no-files-found: error
path: site.zip
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ envdir = {toxworkdir}/shared
commands =
bash tools/flake8wrap.sh -HEAD

[testenv:docs]
description =
Ensure the docs build.
envdir = {toxworkdir}/shared
commands =
mkdocs build

[testenv:py38]
description =
Run python3.8 unit tests
Expand Down

0 comments on commit 94a21db

Please sign in to comment.