Skip to content

[TASK] GitHub workflow #82

[TASK] GitHub workflow

[TASK] GitHub workflow #82

Workflow file for this run

name: Tests
on:
push:
branches:
- '**'
- '!TYPO3V8'
- '!TYPO3V9'
pull_request:
branches:
- '**'
- '!TYPO3V8'
- '!TYPO3V9'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
typo3: [ ^11.5 ]
php: [ '8.0', '8.1', '8.2' ]
experimental: [false]
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Start database server
run: sudo /etc/init.d/mysql start
- name: Checkout
uses: actions/checkout@v2
- name: Set up PHP Version ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
- name: Environment Check
run: |
php --version
composer --version
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies with nimut/typo3-complete:${{ matrix.typo3 }}
run: |
composer require --dev nimut/typo3-complete:${{ matrix.typo3 }} --prefer-source --no-progress
git checkout composer.json
ln -nfs .Build/vendor/typo3/cms/typo3 typo3
- name: Lint PHP
run: find . -name \*.php ! -path "./.Build/*" ! -path "./scripts/*" ! -path "./typo3_src/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
- name: Functional Tests without coverage
run: |
export "FUNCTIONAL_XML"=Tests/Functional/phpunit.xml
.Build/bin/phpunit --whitelist Classes --colors -c $FUNCTIONAL_XML Tests/Functional
if: matrix.typo3 != '^11.5' || matrix.php != '8.0'
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: typo3
typo3DatabasePassword: root
typo3DatabaseUsername: root
- name: Functional Tests with coverage
run: |
export "FUNCTIONAL_XML"=Tests/Functional/phpunit.xml
.Build/bin/phpunit --whitelist Classes --coverage-clover=functional-coverage.clover --colors -c $FUNCTIONAL_XML Tests/Functional
if: matrix.typo3 == '^11.5' && matrix.php == '8.0'
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: typo3
typo3DatabasePassword: root
typo3DatabaseUsername: root