From 5cd52a6ea3f95211cabddc7f4f69b91ae27598c9 Mon Sep 17 00:00:00 2001 From: Jeroen Thora Date: Sat, 7 Nov 2020 15:13:49 +0100 Subject: [PATCH] Switch CI setup from travisci to github actions --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 36 --------------------------- 2 files changed, 53 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..c57a68bb60b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + [push, pull_request] + +jobs: + test: + name: Test on ${{ matrix.php-versions }} PHP + runs-on: ubuntu-latest + + strategy: + matrix: + php-versions: ['7.1', '7.2', '7.3', '7.4'] + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: xdebug + + - name: Install Composer Dependencies + uses: ramsey/composer-install@v1 + + - name: Run phpunit + run: vendor/bin/phpunit --verbose --coverage-text + + roave_bc_check: + name: Roave BC Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Roave BC Check + uses: docker://nyholm/roave-bc-check-ga + + phpstan: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: shivammathur/setup-php@v2 + with: + php-version: 7.1 + + - name: Install Composer Dependencies + uses: ramsey/composer-install@v1 + + - name: Run phpstan + run: vendor/bin/phpstan analyse --no-progress diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 137da8275d4..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: php - -dist: bionic - -cache: - directories: - - $HOME/.composer/cache - -env: - global: - - TEST_COMMAND="vendor/bin/phpunit --verbose --coverage-text" - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -matrix: - include: - - php: 7.4.7 - name: Backward compatibillity check - env: DEPENDENCIES="roave/backward-compatibility-check" TEST_COMMAND="vendor/bin/roave-backward-compatibility-check" - - php: 7.1 - name: phpstan - script: - - vendor/bin/phpstan analyse --no-progress - -before_install: - - if ! [ -z "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; - -install: - - travis_retry composer install - -script: - - $TEST_COMMAND