From 74813e9a0c198219af3617dde0e05cfc6fc58229 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Sat, 6 Jun 2020 23:09:20 +0200 Subject: [PATCH] [FEATURE] Run the functional tests via GitHub Actions (#55) --- .github/workflows/ci.yml | 71 ++++++++++++++++++++++++++++++++++++++-- CHANGELOG.md | 1 + 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea22c9d..a9b4bea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,10 +104,10 @@ jobs: matrix: typo3-version: - "^9.5" - #- "^10.2" + #- "^10.4" composer-dependencies: - highest -# - lowest + #- lowest php-version: - 7.2 - 7.3 @@ -122,7 +122,7 @@ jobs: with: php-version: ${{ matrix.php-version }} - - name: "Cache dependencies installed with composer" + - name: Cache dependencies installed with composer uses: actions/cache@v1 with: path: ~/.composer/cache @@ -151,3 +151,68 @@ jobs: - name: Run unit tests run: composer ci:tests:unit + + functional-tests: + name: Functional tests + + runs-on: ubuntu-latest + + strategy: + matrix: + typo3-version: + - "^9.5" + #- "^10.4" + composer-dependencies: + - highest + #- lowest + php-version: + - 7.2 + - 7.3 + - 7.4 + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + + - name: Cache dependencies installed with composer + uses: actions/cache@v1 + with: + path: ~/.composer/cache + key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer- + + - name: Install TYPO3 Core + env: + TYPO3: ${{ matrix.typo3-version }} + run: | + composer require typo3/minimal:"$TYPO3" + composer show + + - name: Install lowest dependencies with composer + if: matrix.composer-dependencies == 'lowest' + run: | + composer update --no-ansi --no-interaction --no-progress --no-suggest --prefer-lowest + composer show + + - name: Install highest dependencies with composer + if: matrix.composer-dependencies == 'highest' + run: | + composer update --no-ansi --no-interaction --no-progress --no-suggest + composer show + + - name: Start MySQL + run: sudo /etc/init.d/mysql start + + - name: Run functional tests + run: | + export typo3DatabaseName="typo3"; + export typo3DatabaseHost="127.0.0.1"; + export typo3DatabaseUsername="root"; + export typo3DatabasePassword="root"; + composer ci:tests:functional diff --git a/CHANGELOG.md b/CHANGELOG.md index abda0de..2aa5166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## x.y.z ### Added +- Run the functional tests via GitHub Actions (#55) - Cache Composer dependencies in build (#31) - Add a status badge for GitHub actions (#32) - Composer script for PHP code sniffer fixing (#21)