|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [ push, pull_request ] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + runs-on: ubuntu-18.04 |
| 8 | + |
| 9 | + continue-on-error: ${{ matrix.env.experimental == true }} |
| 10 | + strategy: |
| 11 | + fail-fast: false |
| 12 | + matrix: |
| 13 | + env: |
| 14 | + - { php: 7.4, TYPO3_VERSION: ^10.4, TESTING_FRAMEWORK: ^6.5.0 } |
| 15 | + - { php: 7.3, TYPO3_VERSION: ^10.4, TESTING_FRAMEWORK: ^6.5.0 } |
| 16 | + - { php: 7.4, TYPO3_VERSION: ^11.0, TESTING_FRAMEWORK: ^6.6 } |
| 17 | + - { php: 8.0, TYPO3_VERSION: ^11.0, TESTING_FRAMEWORK: ^6.6 } |
| 18 | + |
| 19 | + env: ${{ matrix.env }} |
| 20 | + |
| 21 | + steps: |
| 22 | + - name: Checkout |
| 23 | + uses: actions/checkout@v2 |
| 24 | + |
| 25 | + - name: Setup PHP |
| 26 | + uses: shivammathur/setup-php@v2 |
| 27 | + with: |
| 28 | + php-version: ${{ matrix.env.php }} |
| 29 | + tools: composer |
| 30 | + extensions: pdo, sqlite3 |
| 31 | + |
| 32 | + # composer |
| 33 | + - name: Update Composer |
| 34 | + run: | |
| 35 | + sudo composer self-update |
| 36 | + composer --version |
| 37 | + - name: Validate composer.json and composer.lock |
| 38 | + run: composer validate |
| 39 | + - name: Cache dependencies |
| 40 | + uses: actions/cache@v1 |
| 41 | + with: |
| 42 | + path: ~/.composer/cache |
| 43 | + key: dependencies-composer-${{ hashFiles('composer.json') }} |
| 44 | + |
| 45 | + - name: Ensure stability dev |
| 46 | + if: ${{ matrix.env.TYPO3_VERSION == 'dev-main' }} |
| 47 | + run: | |
| 48 | + composer config minimum-stability dev |
| 49 | + composer config prefer-stable true |
| 50 | + - name: Install TYPO3 core |
| 51 | + run: composer require typo3/cms-core="${TYPO3_VERSION}" ${PREFER_LOWEST}; |
| 52 | + |
| 53 | + - name: Install testing framework ${{ matrix.env.TESTING_FRAMEWORK }} |
| 54 | + if: ${{ matrix.env.TESTING_FRAMEWORK }} |
| 55 | + run: composer require --dev typo3/testing-framework="${TESTING_FRAMEWORK}"; |
| 56 | + |
| 57 | + - name: Install prophecy trait |
| 58 | + if: ${{ matrix.env.TESTING_FRAMEWORK }} |
| 59 | + run: composer require --dev phpspec/prophecy-phpunit="^2.0"; |
| 60 | + |
| 61 | + # unit tests |
| 62 | + - name: Unit Tests |
| 63 | + run: | |
| 64 | + echo "Running ${TYPO3_VERSION} unit tests with $(which php)"; |
| 65 | + .Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml Tests/Unit/; |
| 66 | +
|
| 67 | + - name: Reset composer.json |
| 68 | + run: git checkout composer.json; |
0 commit comments