From 9be1c237984e09a823603070cf193f22e0185c7c Mon Sep 17 00:00:00 2001 From: Andreas Wolf Date: Sat, 7 Dec 2019 19:00:51 +0100 Subject: [PATCH] [TASK] Move unit test run to GitHub actions (#38) --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 5 ----- CHANGELOG.md | 1 + 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfef200..e319bbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,3 +69,43 @@ jobs: - name: Run PHP Code Sniffer run: composer ci:php:sniff + + unit-tests: + name: Unit tests + + runs-on: ubuntu-latest + + strategy: + matrix: + typo3-version: + - "^9.5" + #- "^10.2" + php-version: + - 7.2 + - 7.3 + - 7.4 + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - 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 Composer dependencies + run: composer install --no-progress + + - name: Run unit tests + run: composer ci:tests:unit diff --git a/.travis.yml b/.travis.yml index edbee6e..d820102 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,11 +32,6 @@ install: git checkout .; script: -- > - echo; - echo "Running the unit tests"; - composer ci:tests:unit; - - > echo; echo "Running the functional tests"; diff --git a/CHANGELOG.md b/CHANGELOG.md index 45e502d..625099f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - Composer script for PHP linting ### Changed +- Run unit tests with GitHub actions (#37) - Switch from PSR-2 to PSR-12 (#3, #35) - Move TypoScript linting to GitHub actions (#14) - Move PHP code sniffing to GitHub actions (#13)