Skip to content

[FEATURE] Allow extensions to modify new content wizard URLs #402

[FEATURE] Allow extensions to modify new content wizard URLs

[FEATURE] Allow extensions to modify new content wizard URLs #402

Workflow file for this run

name: Tasks
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
schedule:
- cron: "0 2 * * 1-5"
jobs:
test-js:
name: JavaScript tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v5
with:
node-version: '22'
- run: npm run test
lint-js:
name: JavaScript lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v5
with:
node-version: '22'
- run: npm ci
- run: npm run lint
lint-php:
name: "php: ${{ matrix.php }} TYPO3: ${{ matrix.typo3 }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4', '8.5' ]
typo3: [ '13', '14' ]
steps:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/checkout@v6
- run: composer update --with typo3/cms-core:^${{ matrix.typo3 }}
- run: ./vendor/bin/grumphp run --ansi
unit-tests:
name: "unit php: ${{ matrix.php }} TYPO3: ${{ matrix.typo3 }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4', '8.5' ]
typo3: [ '13', '14' ]
steps:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/checkout@v6
- run: composer update --with typo3/cms-core:^${{ matrix.typo3 }}
- run: CI=true ./Build/Scripts/runTests.sh -p ${{ matrix.php }} -s unit
functional-tests:
name: "functional php: ${{ matrix.php }} TYPO3: ${{ matrix.typo3 }} DB: ${{ matrix.dbms }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Do not use a full php x TYPO3 x DBMS matrix here: it creates too many
# parallel CI jobs. Keep SQLite broad and run server DBMS on boundary
# platform combinations to retain useful compatibility coverage.
include:
- php: '8.2'
typo3: '13'
dbms: 'sqlite'
- php: '8.2'
typo3: '13'
dbms: 'mariadb'
- php: '8.2'
typo3: '13'
dbms: 'mysql'
- php: '8.2'
typo3: '13'
dbms: 'postgres'
- php: '8.2'
typo3: '14'
dbms: 'sqlite'
- php: '8.3'
typo3: '13'
dbms: 'sqlite'
- php: '8.3'
typo3: '14'
dbms: 'sqlite'
- php: '8.4'
typo3: '13'
dbms: 'sqlite'
- php: '8.4'
typo3: '14'
dbms: 'sqlite'
- php: '8.5'
typo3: '13'
dbms: 'sqlite'
- php: '8.5'
typo3: '14'
dbms: 'sqlite'
- php: '8.5'
typo3: '14'
dbms: 'mariadb'
- php: '8.5'
typo3: '14'
dbms: 'mysql'
- php: '8.5'
typo3: '14'
dbms: 'postgres'
steps:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/checkout@v6
- run: composer update --with typo3/cms-core:^${{ matrix.typo3 }}
- run: CI=true ./Build/Scripts/runTests.sh -p ${{ matrix.php }} -d ${{ matrix.dbms }} -s functional
ter-release:
name: Publish new version to TER
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [ lint-js, lint-php, unit-tests, functional-tests ]
env:
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
steps:
- uses: actions/checkout@v6
- name: Get the version
id: get-version
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
extensions: intl, mbstring, xml, soap, zip, curl
- name: Get comment
id: get-comment
run: |
curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/FriendsOfTYPO3/visual_editor/releases/tags/${{ env.version }} > release.json
readonly local comment=$(
jq -r '.name, "", .body, "", .html_url' release.json \
| php -r 'echo preg_replace("/[\x{1F1E6}-\x{1F1FF}\x{1F300}-\x{1FAFF}\x{2600}-\x{27BF}\x{FE0F}\x{200D}]/u", "", stream_get_contents(STDIN));' \
)
{
echo 'comment<<EOF'
echo "$comment"
echo EOF
} >> "$GITHUB_ENV"
- name: Install typo3/tailor
run: composer global require typo3/tailor --prefer-dist --no-progress
- name: Upload EXT:visual_editor to TER
run: |
sed -i "s|'dev-'|'${{ env.version }}'|g" ext_emconf.php \
&& git config --global user.email "no@one" \
&& git config --global user.name "No One" \
&& git add ext_emconf.php \
&& git commit -m 'x' -n \
&& git archive -o archive.zip HEAD --prefix=visual_editor-${{ env.version }}/ \
&& git reset --hard HEAD~ \
&& php ~/.composer/vendor/bin/tailor ter:publish -vvv ${{ env.version }} --artefact=archive.zip --comment="${{ env.comment }}"