diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..8c116f81c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,66 @@ +name: build + +on: + push: + branches: [ master, development, '[0-9]+.[0-9]+', '[0-9]+.[0-9]+.[0-9]+' ] + pull_request: + branches: [ master, development, '[0-9]+.[0-9]', '[0-9]+.[0-9]+.[0-9]+' ] + +jobs: + build: + if: "!contains(github.event.head_commit.message, '[skip ci]')" + name: "PHP ${{ matrix.php-versions }} Test (deps: ${{ matrix.dependencies }})" + + continue-on-error: ${{ matrix.experimental }} + + strategy: + fail-fast: false + matrix: + php-versions: ['7.2', '7.3', '7.4'] + dependencies: ['highest'] + composer-arguments: [''] # to run --ignore-platform-reqs in experimental builds + typo3-version: ['^9.5', '^8.7'] + experimental: [false] + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, json + coverage: xdebug #optional + ini-values: date.timezone="Africa/Tunis", opcache.fast_shutdown=0 + + - name: Select TYPO3 version + run: "composer require typo3/cms-core:${{ matrix.typo3-version }}" + + - name: Composer install + uses: ramsey/composer-install@v1 + with: + dependency-versions: ${{ matrix.dependencies }} + composer-options: ${{ matrix.composer-arguments }} + + - name: Run tests + run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml + + - name: Coveralls + run: vendor/bin/php-coveralls -v + env: + COVERALLS_RUN_LOCALLY: 1 + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + + # Use this step to configure a required build pass via gh branch protection rules (currently makes experimental builds unusable due to https://github.com/actions/toolkit/issues/581) + #buildall: + # if: "!contains(github.event.head_commit.message, '[skip ci]')" + # runs-on: ubuntu-latest + # name: CI build (matrix) + # needs: build + # steps: + # - name: Check build matrix status + # if: ${{ needs.build.result != 'success' }} + # run: exit 1