[BUGFIX] allow empty groupValue and fallback to empty string as a group #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ main, release-10.0.x ] | |
tags: | |
- "**" | |
pull_request: | |
branches: [ main, release-10.0.x ] | |
env: | |
EXT_SOLR_VERSION: 'dev-release-11.5.x' | |
TYPO3_DATABASE_NAME: 'typo3_ci' | |
TYPO3_DATABASE_HOST: '127.0.0.1' | |
TYPO3_DATABASE_USERNAME: 'root' | |
TYPO3_DATABASE_PASSWORD: 'root' | |
LOCAL_IMAGE_NAME: 'solrci-image:latest' | |
LOCAL_CONTAINER_NAME: 'solrci-container' | |
TESTING_SOLR_PORT: 8983 | |
LOCAL_SOLR_VOLUME_NAME: 'solrci-volume' | |
LOCAL_SOLR_VOLUME_PATH: '/ramfs/data-solr' | |
CI_BUILD_DIRECTORY: '/ramfs/data-build' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
PHP: [ '7.4', '8.0', '8.1' ] | |
TYPO3: [ '^11.5', '11.5.x-dev' ] | |
continue-on-error: ${{ contains(matrix.TYPO3, '-dev') }} | |
env: | |
TYPO3_VERSION: ${{ matrix.TYPO3 }} | |
name: TYPO3 ${{ matrix.TYPO3 }} on PHP ${{ matrix.PHP }} | |
steps: | |
# Workaround for issue with actions/checkout@v2 wrong PR commit checkout: See https://github.com/actions/checkout/issues/299#issuecomment-677674415 | |
- | |
name: Checkout current state of Pull Request | |
if: github.event_name == 'pull_request' | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- | |
name: Checkout current state of Branch | |
if: github.event_name == 'push' | |
uses: actions/checkout@v2 | |
- | |
name: Mount RAMFS | |
run: | | |
id | |
sudo mkdir /ramfs | |
sudo mount -t tmpfs -o size=2560m none /ramfs | |
sudo mkdir -p /ramfs/data-{solr,mysql,build} && sudo chown $USER /ramfs/data-* && sudo chown 8983:8983 /ramfs/data-solr | |
- | |
name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.PHP }} | |
coverage: xdebug | |
tools: composer:v2 | |
- | |
name: CI-Bootstrap | |
run: | | |
echo "CI_BUILD_DIRECTORY=$CI_BUILD_DIRECTORY/" | |
cp -r ../ext-solrfluidgrouping $CI_BUILD_DIRECTORY/. | |
cd $CI_BUILD_DIRECTORY/ext-solrfluidgrouping | |
./Build/Test/bootstrap.sh --skip-solr-install | |
echo "Current Size of EXT:solrfluidgrouping build Artefacts: " && du -sh $CI_BUILD_DIRECTORY/ext-solrfluidgrouping | |
- | |
name: Build ext-solr docker image | |
run: | | |
cd $CI_BUILD_DIRECTORY/ext-solrfluidgrouping | |
docker build -t $LOCAL_IMAGE_NAME -f .Build/Web/typo3conf/ext/solr/Docker/SolrServer/Dockerfile .Build/Web/typo3conf/ext/solr/ | |
- | |
name: 'Start Docker: Solr, solrfluidgrouping, MySQL' | |
run: | | |
docker run --name "MySQL-CI" -v /ramfs/data-mysql:/var/lib/mysql -p 3306:3306 \ | |
-e MYSQL_DATABASE=$TYPO3_DATABASE_NAME \ | |
-e MYSQL_ROOT_PASSWORD=$TYPO3_DATABASE_PASSWORD \ | |
-d mysql:8.0 mysqld --default-authentication-plugin=mysql_native_password | |
sudo chmod g+w "$LOCAL_SOLR_VOLUME_PATH" | |
docker volume create --name "$LOCAL_SOLR_VOLUME_NAME" --opt type=none --opt device="$LOCAL_SOLR_VOLUME_PATH" --opt o=bind | |
docker run --rm --name="$LOCAL_CONTAINER_NAME" -d -p 127.0.0.1:8983:8983 -v "$LOCAL_SOLR_VOLUME_NAME":"/var/solr" "$LOCAL_IMAGE_NAME" | |
docker ps | |
- | |
name: CI-Build | |
run: | | |
cd $CI_BUILD_DIRECTORY/ext-solrfluidgrouping | |
./Build/Test/cibuild.sh | |
echo "Current Size of EXT:solrfluidgrouping build Artefacts: " && du -sh $CI_BUILD_DIRECTORY/ && du -sh $CI_BUILD_DIRECTORY/ext-solrfluidgrouping/.Build/* | |
- | |
name: Clean up | |
run: | | |
docker stop "MySQL-CI" 2>&1 | |
docker stop "$LOCAL_CONTAINER_NAME" 2>&1 | |
sudo rm -Rf ${{ env.CI_BUILD_DIRECTORY }}/Web/typo3temp/* \ | |
${{ env.CI_BUILD_DIRECTORY }}/data-mysql \ | |
${{ env.CI_BUILD_DIRECTORY }}/data-solr | |
publish: | |
name: Publish new version to TER | |
needs: tests | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-20.04 | |
env: | |
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }} | |
steps: | |
- | |
name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- | |
name: Check tag | |
run: | | |
if ! [[ ${{ github.ref }} =~ ^refs/tags/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then | |
exit 1 | |
fi | |
- | |
name: Get version | |
id: get-version | |
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} | |
- | |
name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
extensions: intl, mbstring, json, zip, curl | |
tools: composer:v2 | |
- | |
name: Install tailor | |
run: composer global require typo3/tailor --prefer-dist --no-progress | |
- | |
name: Publish EXT:solrfluidgrouping to TER | |
run: | | |
export RELEASE_VERSION=${GITHUB_REF/refs\/tags\//} | |
export TER_COMMENT=$(git tag -n99 -l "$RELEASE_VERSION" | sed "s/^[0-9.]*[ ]*//g") | |
if [[ -z "${TER_COMMENT// }" ]]; then | |
export TER_COMMENT="Released version $RELEASE_VERSION of EXT:solrfluidgrouping" | |
fi | |
echo "Following message will be printed in TER as release description:" | |
echo -e "$TER_COMMENT" | |
php ~/.composer/vendor/bin/tailor ter:publish --comment "$TER_COMMENT" "$RELEASE_VERSION" |