Repository navigation
Close the test failure reporting shell condition #15
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '56 5 * * *' | |
| jobs: | |
| testsuite: | |
| name: all tests | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [ '8.2', '8.3', '8.4', '8.5'] | |
| TYPO3: [ '13', '14', '14-dev' ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install testing system | |
| shell: bash | |
| run: | | |
| set -o pipefail | |
| Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s composerInstall 2>&1 | tee /tmp/php85-install.log | |
| - name: Report dependency installation failure | |
| if: failure() | |
| run: | | |
| if [ -f /tmp/php85-install.log ]; then | |
| python3 -c 'import pathlib; s=pathlib.Path("/tmp/php85-install.log").read_text()[-5000:]; print("::error::"+s.replace("%","%25").replace("\r","%0D").replace("\n","%0A"))' | |
| fi | |
| - name: Composer validate | |
| run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s composerValidate | |
| - name: Lint PHP | |
| run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s lint | |
| - name: CGL | |
| run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s cgl -n | |
| - name: phpstan | |
| run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s phpstan | |
| - name: Unit Tests | |
| run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s unit | |
| - name: Functional Tests | |
| run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s functional -- --do-not-fail-on-deprecation | |
| if: matrix.TYPO3 == '13' | |
| - name: Functional Tests 14 | |
| shell: bash | |
| run: | | |
| set -o pipefail | |
| Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s functional 2>&1 | tee /tmp/php85-tests.log | |
| if: matrix.TYPO3 != '13' | |
| - name: Acceptance Tests | |
| shell: bash | |
| run: | | |
| set -o pipefail | |
| Build/Scripts/runTests.sh -p ${{ matrix.php }} -t ${{ matrix.TYPO3 }} -s acceptance -- --fail-fast 2>&1 | tee /tmp/php85-tests.log | |
| - name: Archive acceptance tests results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: acceptance-test-reports-${{ matrix.php }}-${{ matrix.TYPO3 }} | |
| path: .Build/Web/typo3temp/var/tests/_output | |
| - name: Archive composer.lock | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: composer.lock-${{ matrix.php }}-${{ matrix.TYPO3 }} | |
| path: composer.lock | |
| - name: Report test failure | |
| if: failure() | |
| run: | | |
| if [ -f /tmp/php85-tests.log ]; then | |
| python3 -c 'import pathlib; s=pathlib.Path("/tmp/php85-tests.log").read_text()[-5000:]; print("::error::"+s.replace("%","%25").replace("\r","%0D").replace("\n","%0A"))' | |
| fi |