Skip to content

Commit

Permalink
[TASK] Use --minimal-test CLI option for documentation tests (#547)
Browse files Browse the repository at this point in the history
This allows us to control specific settings needed for mininmal tests (like setting only a single output format) or more for the future.

See also: TYPO3-Documentation/render-guides#765

Releases: main, 12.4, 11.5

(cherry picked from commit 6ae38ac)
  • Loading branch information
linawolf committed Oct 1, 2024
1 parent 8258331 commit 1ad14ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: test documentation

on: [ push, pull_request ]

jobs:
tests:
name: documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Test if the documentation will render without warnings
run: |
mkdir -p Documentation-GENERATED-temp \
&& docker run --rm --pull always -v $(pwd):/project \
ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --minimal-test
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,8 @@ docs: ## Generate projects docs (from "Documentation" directory)

docker run --rm --pull always -v "$(shell pwd)":/project -t ghcr.io/typo3-documentation/render-guides:latest --config=Documentation

.PHONY: codesnippets
codesnippets: ## Regenerate automatic code snippets
.Build/vendor/bin/typo3 codesnippet:create Documentation/CodeSnippets/

.PHONY: test
test: test-lint test-cgl test-docs ## Runs all test suites

.PHONY: test-lint
test-lint: ## Lint PHP includes
Build/Scripts/runTests.sh -s lint

.PHONY: test-cgl
test-cgl: ## Test coding guidelines to PHP includes
Build/Scripts/runTests.sh -n -s cgl

.PHONY: fix-cgl
fix-cgl: ## Apply coding guidelines to PHP includes
Build/Scripts/runTests.sh -s cgl

.PHONY: test-docs
test-docs: ## Test the documentation rendering
mkdir -p Documentation-GENERATED-temp

docker run --rm --pull always -v "$(shell pwd)":/project -t ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --fail-on-log --output-format=html

docker run --rm --pull always -v "$(shell pwd)":/project -t ghcr.io/typo3-documentation/render-guides:latest --config=Documentation --no-progress --minimal-test

0 comments on commit 1ad14ad

Please sign in to comment.