CI: Add TYPO3 v13 to test matrix #1518
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: Acceptance Tests | |
on: | |
pull_request: | |
branches: | |
- "**" | |
push: | |
branches: | |
- "main" | |
jobs: | |
Acceptance-CodeCeption: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
typo3: | |
- ^12.4 | |
php: | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
steps: | |
- name: Get branch name (merge) | |
if: github.event_name != 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | |
- name: Get branch name (pull request) | |
if: github.event_name == 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer:v2 | |
coverage: none | |
- name: Version information | |
run: | | |
php -v | |
composer --version | |
- uses: actions/checkout@v4 | |
- uses: ddev/github-action-setup-ddev@v1 | |
with: | |
ddevDir: ".devbox" | |
- name: CodeCeption | |
run: | | |
export FROM_PATH='../../' | |
export TO_PATH=$(echo $GITHUB_WORKSPACE) | |
cd .devbox | |
sed -i 's/php_version: "8.1"/php_version: "${{ matrix.php }}"/g' .ddev/config.yaml | |
sed -i "s|$FROM_PATH|$TO_PATH|g" .ddev/docker-compose.volume.yaml | |
ddev restart | |
rm -rf vendor composer.lock | |
ddev composer require typo3/cms-core=${{ matrix.typo3 }} tomasnorre/crawler=dev-$BRANCH_NAME georgringer/news | |
ddev exec bin/typo3 backend:lock | |
ddev exec bin/typo3 extension:setup | |
ddev exec bin/typo3 cache:flush | |
ddev exec bin/typo3 cache:warmup | |
ddev exec bin/typo3 upgrade:run | |
ddev exec bin/typo3 backend:unlock | |
cd .. # Going back to "root" directory | |
rm -rf .Build composer.lock | |
composer require typo3/cms-core=${{ matrix.typo3 }} | |
wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh | |
chmod +x wait-for-it.sh | |
docker ps | |
./wait-for-it.sh -t 60 127.0.0.1:80 | |
./wait-for-it.sh -t 60 127.0.0.1:443 | |
./wait-for-it.sh -t 60 localhost:4444 | |
php .Build/bin/codecept run | |
- name: Database Dump | |
if: ${{ failure() }} | |
run: | | |
cd .devbox | |
ddev export-db --gzip=false --file=../Tests/Acceptance/_output/db.sql | |
- name: Upload Codeception output | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: codeception-results | |
path: Tests/Acceptance/_output/ | |
- uses: shallwefootball/s3-upload-action@master | |
if: ${{ failure() }} | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: 'Tests/Acceptance/_output/' | |
destination_dir: '${{ matrix.typo3 }}-${{ matrix.php }}' | |
Acceptance-Playwright: | |
strategy: | |
fail-fast: false | |
matrix: | |
typo3: | |
- ^13.4 | |
php: | |
- '8.2' | |
- '8.3' | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get branch name (merge) | |
if: github.event_name != 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV | |
- name: Get branch name (pull request) | |
if: github.event_name == 'pull_request' | |
shell: bash | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
- uses: ddev/github-action-setup-ddev@v1 | |
with: | |
ddevDir: ".devbox" | |
- name: CodeCeption | |
run: | | |
export FROM_PATH='../../' | |
export TO_PATH=$(echo $GITHUB_WORKSPACE) | |
cd .devbox | |
sed -i 's/php_version: "8.1"/php_version: "${{ matrix.php }}"/g' .ddev/config.yaml | |
sed -i "s|$FROM_PATH|$TO_PATH|g" .ddev/docker-compose.volume.yaml | |
ddev restart | |
rm -rf vendor composer.lock | |
ddev composer require typo3/cms-core=${{ matrix.typo3 }} tomasnorre/crawler=dev-$BRANCH_NAME | |
ddev exec bin/typo3 backend:lock | |
ddev exec bin/typo3 extension:setup | |
ddev exec bin/typo3 cache:flush | |
ddev exec bin/typo3 cache:warmup | |
ddev exec bin/typo3 upgrade:run | |
ddev exec bin/typo3 backend:unlock | |
cd .. # Going back to "root" directory | |
wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh | |
chmod +x wait-for-it.sh | |
docker ps | |
./wait-for-it.sh -t 60 127.0.0.1:80 | |
./wait-for-it.sh -t 60 127.0.0.1:443 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: cd Tests/Acceptance-Playwright && npm ci | |
- name: Install Playwright Browsers | |
run: cd Tests/Acceptance-Playwright && npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: cd Tests/Acceptance-Playwright && npx playwright test | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |