diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml new file mode 100644 index 00000000..39fdb967 --- /dev/null +++ b/.github/workflows/test-application.yaml @@ -0,0 +1,62 @@ +name: "Test application" + +on: + pull_request: + push: + branches: + - "master" + - "[0-9]+.x" + - "[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.x" + +jobs: + test: + name: "PHP ${{ matrix.php-version }}, Symfony ${{ matrix.symfony-require }} ${{ matrix.dependencies }}" + runs-on: "ubuntu-20.04" + env: + SYMFONY_DEPRECATIONS_HELPER: weak + + strategy: + fail-fast: false + matrix: + include: + - php-version: "7.2" + dependencies: "lowest" + symfony-require: "4.4.*" + + - php-version: "7.4" + symfony-require: "4.4.*" + + - php-version: "7.4" + symfony-require: "5.0.*" + + - php-version: "8.0" + symfony-require: "*" + + steps: + - name: "Checkout project" + uses: "actions/checkout@v2" + + - name: "Install and configure PHP" + uses: "shivammathur/setup-php@v2" + with: + php-version: "${{ matrix.php-version }}" + extensions: "pdo, pdo_sqlite" + tools: "composer:v2" + + - name: "Require Specific Symfony Version" + if: "${{ matrix.symfony-version }}" + run: "composer require --no-update symfony/symfony:${{ matrix.symfony-version }}" + + - name: "Install dependencies with Composer" + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist" + + - name: "Execute test cases" + run: | + if [[ $SYMFONY_PHPUNIT_VERSION == '' ]]; then unset SYMFONY_PHPUNIT_VERSION; fi; + make test + env: + SYMFONY_PHPUNIT_VERSION: "${{ matrix.phpunit-version }}" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 91564251..00000000 --- a/.travis.yml +++ /dev/null @@ -1,58 +0,0 @@ -####################################################### -# DO NOT EDIT THIS FILE! # -# # -# It's auto-generated by symfony-cmf/dev-kit package. # -####################################################### - -############################################################################ -# This file is part of the Symfony CMF package. # -# # -# (c) Symfony CMF # -# # -# For the full copyright and license information, please view the LICENSE # -# file that was distributed with this source code. # -############################################################################ - -language: php - -php: - - 7.2 - - 7.3 - -sudo: false - -cache: - directories: - - .phpunit - - $HOME/.composer/cache - -env: - global: - - SYMFONY_PHPUNIT_VERSION=6 - - COMPOSER_MEMORY_LIMIT=-1 - - SYMFONY_DEPRECATIONS_HELPER="max[self]=0" - -matrix: - include: - - php: 7.2 - env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_REQUIRE=4.4.* SYMFONY_DEPRECATIONS_HELPER=weak - - php: 7.4 - env: SYMFONY_REQUIRE=4.4.* - - php: 7.4 - env: SYMFONY_REQUIRE=5.0.* - - php: nightly - env: COMPOSER_FLAGS="--no-interaction --ignore-platform-req=php" SYMFONY_PHPUNIT_VERSION=9 SYMFONY_REQUIRE=5.0.* - fast_finish: true - allow_failures: - -before_install: - - phpenv config-rm xdebug.ini || true - - composer global require --no-progress --no-scripts --no-plugins symfony/flex - -install: travis_wait composer update -n --prefer-stable --prefer-dist $COMPOSER_FLAGS -script: - - composer validate --no-check-all --ansi - - make test - -notifications: - irc: "irc.freenode.org#symfony-cmf"