[TASK] Optimize typescript code and build #203
This file contains hidden or 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: Tests | |
| on: [ push, pull_request ] | |
| jobs: | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [ '8.2', '8.3', '8.4', '8.5' ] | |
| typo3: [ '12', '13' ] | |
| composerInstall: [ 'composerInstallLowest', 'composerInstallHighest' ] | |
| # include: | |
| # - typo3: '12' | |
| # php: '8.1' | |
| # composerInstall: 'composerInstallLowest' | |
| # - typo3: '12' | |
| # php: '8.1' | |
| # composerInstall: 'composerInstallHighest' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Composer validate | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s composerValidate | |
| - name: Install dependencies | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s ${{ matrix.composerInstall }} | |
| - name: Composer normalize | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s composerNormalize -n | |
| - name: Lint PHP | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s lint | |
| - name: CGL | |
| run: Build/Scripts/runTests.sh -n -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s cgl -n | |
| - name: PHPStan | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s phpstan -e "--error-format=github" | |
| - name: Functional tests | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s functional | |
| - name: Unit tests | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s unit | |
| - name: Functional tests coverage | |
| if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest' | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s unit -x -e "--coverage-php=.Build/coverage/functional.cov" | |
| - name: Unit tests coverage | |
| if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest' | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s unit -x -e "--coverage-php=.Build/coverage/unit.cov" | |
| - name: Composer require phpunit/phpcov for merging the code coverage | |
| if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest' | |
| run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s composer require --dev phpunit/phpcov | |
| - name: Merge coverage | |
| if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest' | |
| run: ./.Build/bin/phpcov merge --clover=build/logs/clover.xml .Build/coverage | |
| - name: Upload coverage | |
| if: matrix.php == '8.2' && matrix.typo3 == '13' && matrix.composerInstall == 'composerInstallHighest' | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| composer global require php-coveralls/php-coveralls | |
| export PATH="$(composer config -g home)/vendor/bin:$PATH" | |
| php-coveralls --coverage_clover=build/logs/clover.xml -v |