Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP-based rest testing #428

Merged
merged 7 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: reference-tsconfig
type: php
docroot: ""
php_version: "8.1"
php_version: "8.2"
webserver_type: nginx-fpm
router_http_port: "8081"
router_https_port: "4434"
Expand Down
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 --fail-on-log
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,3 @@ jobs:

- name: CGL
run: Build/Scripts/runTests.sh -n -p ${{ env.php }} -s cgl -n

- name: Check Rst
run: Build/Scripts/runTests.sh -p ${{ env.php }} -s checkRst
8 changes: 0 additions & 8 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ No arguments: Run all checks with PHP 8.2
Options:
-s <...>
Specifies which test suite to run
- checkRst: test .rst files for integrity
- cgl: cgl test and fix all php files
- composerUpdate: "composer update", handy if host has no PHP
- lint: PHP linting
- rector: Apply Rector rules

-p <8.2|8.3>
Specifies the PHP minor version to be used
Expand Down Expand Up @@ -165,12 +163,6 @@ DOCKER_PHP_IMAGE=`echo "php${PHP_VERSION}" | sed -e 's/\.//'`

# Suite execution
case ${TEST_SUITE} in
checkRst)
setUpDockerComposeDotEnv
docker-compose run check_rst
SUITE_EXIT_CODE=$?
docker-compose down
;;
cgl)
# Active dry-run for cgl needs not "-n" but specific options
if [[ ! -z ${CGLCHECK_DRY_RUN} ]]; then
Expand Down
183 changes: 0 additions & 183 deletions Build/Scripts/validateRstFiles.php

This file was deleted.

20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,27 @@ help: ## Displays this list of targets with descriptions
@echo "The following commands are available:\n"
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'


.PHONY: docs
docs: ## Generate projects docs (from "Documentation" directory)
mkdir -p Documentation-GENERATED-temp

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
26 changes: 0 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,5 @@
"typo3/cms-tstemplate": "dev-main",
"typo3/cms-viewpage": "dev-main",
"typo3/cms-workspaces": "dev-main"
},
"scripts": {
"check": [
"@check:php",
"@check:rst"
],
"check:php": [
"@check:php:lint",
"@check:php:cs"
],
"check:php:cs": "Build/Scripts/runTests.sh -n -s cgl",
"check:php:lint": "Build/Scripts/runTests.sh -s lint",
"check:rst": "Build/Scripts/runTests.sh -s checkRst",
"fix": [
"@fix:php"
],
"fix:php": [
"@fix:php:cs"
],
"fix:php:cs": "Build/Scripts/runTests.sh -s cgl",
"generate:codesnippets": [
".Build/vendor/bin/typo3 codesnippet:create Documentation/CodeSnippets/"
],
"generate": [
"@generate:codesnippets"
]
}
}
Loading