Skip to content

Commit

Permalink
[TASK] Replace cibuild.sh
Browse files Browse the repository at this point in the history
Separate GitHub action steps now replace all steps done in the old
cibuild from EXT:solr script.
  • Loading branch information
dkd-friedrich committed Oct 7, 2024
1 parent 3a7fe80 commit 53bba67
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 11 deletions.
53 changes: 42 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
PHP: [ '8.2', '8.3' ]
TYPO3: [ 'dev-main' ]
env:
TYPO3_DATABASE_NAME: 'typo3_ci'
TYPO3_DATABASE_HOST: '127.0.0.1'
TYPO3_DATABASE_USERNAME: 'root'
TYPO3_DATABASE_PASSWORD: 'root'
typo3DatabaseName: 'typo3_ci'
typo3DatabaseHost: '127.0.0.1'
typo3DatabaseUsername: 'root'
typo3DatabasePassword: 'root'
TYPO3_VERSION: ${{ matrix.TYPO3 }}

name: TYPO3 ${{ matrix.TYPO3 }} on PHP ${{ matrix.PHP }}
Expand Down Expand Up @@ -88,8 +88,8 @@ jobs:
name: 'Start Docker: Solr, Tika, MySQL'
run: |
docker run --name "MySQL-CI" -v ${{ env.CI_BUILD_DIRECTORY }}/data-mysql:/var/lib/mysql -p 3306:3306 \
-e MYSQL_DATABASE=$TYPO3_DATABASE_NAME \
-e MYSQL_ROOT_PASSWORD=$TYPO3_DATABASE_PASSWORD \
-e MYSQL_DATABASE=$typo3DatabaseName \
-e MYSQL_ROOT_PASSWORD=$typo3DatabasePassword \
-d mysql:8.0 mysqld --default-authentication-plugin=mysql_native_password
sudo chmod g+w "$SOLR_VOLUME_PATH"
docker volume create --name "$SOLR_VOLUME_NAME" --opt type=none --opt device="$SOLR_VOLUME_PATH" --opt o=bind
Expand All @@ -98,18 +98,49 @@ jobs:
docker ps
-
name: CI-Bootstrap
id: 'bootstrap'
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
composer info
composer tests:setup
echo "Current Size of EXT:tika build Artefacts: " \
&& sudo du -sh "${{ env.CI_BUILD_DIRECTORY }}"
-
name: CI-Build
name: 'PHP Lint'
id: 'php-lint'
if: ${{ always() }}
run: |
./.Build/vendor/apache-solr-for-typo3/solr/Build/Test/cibuild.sh
echo "Current Size of EXT:tika build Artefacts: " \
&& sudo du -sh $CI_BUILD_DIRECTORY/ \
&& sudo du -sh $CI_BUILD_DIRECTORY/*
composer tests:lint-php
-
name: 'Coding standards'
id: 'coding-standards'
if: ${{ always() }}
run: |
composer t3:standards:check
-
name: 'XML Lint'
id: 'xml-lint'
if: ${{ always() }}
run: |
composer tests:lint-xml
- name: 'PHPStan'
id: 'phpstan'
if: ${{ always() }}
run: |
composer tests:phpstan
-
name: 'Unit tests'
id: 'unit-tests'
if: ${{ always() }}
run: |
composer tests:unit
-
name: 'Integration tests'
id: 'integration-tests'
if: ${{ always() }}
run: |
composer tests:integration
publish:
name: Publish new version to TER
Expand Down
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@
"t3:docs:build": "Renders the docs. Note: Can not run inside docker container, because uses TYPO3 dockrun_t3rd",
"t3:docs:build:prod": "Same as t3:docs:build, but places the rendered docs in Resources/Public/Documentation and symlinks them to EXT:tika/Documentation.HTML",
"t3:docs:clean": "Deletes all rendered docs created by t3:docs:build or t3:docs:build:prod.",
"t3:standards:check": "Checks for TYPO3 coding standards errors.",
"t3:standards:fix": "Fixes a possible TYPO3 coding standards errors.",

"tests:env": "Checks the requirements in environment for tests.",
"tests:integration": "Runs integration tests",
"tests:lint-php": "Lints the PHP files.",
"tests:lint-xml": "Lints the XML/XLF files.",
"tests:phpstan": "Runs PHPStan analys",
"tests:restore-git": "[Internal script], which is used after tests:setup to restore the composer.json.",
Expand Down Expand Up @@ -134,9 +136,15 @@
"tests:phpstan": [
"phpstan analyze -c Build/Test/phpstan.neon"
],
"t3:standards:check": [
"php-cs-fixer check --diff"
],
"t3:standards:fix": [
"php-cs-fixer fix"
],
"tests:lint-php": [
"if ! find . -name \\*.php ! -path \"./.Build/*\" 2>/dev/null | parallel --gnu php -d display_errors=stderr -l {} > /dev/null; then echo \"There are syntax errors, please check and fix them.\" && export EXIT_CODE=1; else echo \"No syntax errors! Great job!\"; fi"
],
"tests:lint-xml": [
"echo \"Run XML Lint\"",
"if ! xmllint Resources/Private/Language/ --pattern='*.xlf' --exclude=.Build/*; then echo \"Some XML files are not valid\" && echo \"Please fix the files listed above\" && export EXIT_CODE=4; else echo \"No syntax errors! Great job!\"; fi"
Expand Down

0 comments on commit 53bba67

Please sign in to comment.