From a09d15a372eb4e624c946e810d9f9b5e516af7dd Mon Sep 17 00:00:00 2001 From: Daric DESBONNES Date: Fri, 13 Aug 2021 09:49:44 +0200 Subject: [PATCH] Travis to github-actions --- .github/workflows/gitlab-actions.yml | 24 +++++++++++++++++++ .travis.yml | 35 ---------------------------- .travis/after_success_ci.sh | 4 ---- .travis/before_install_ci.sh | 8 ------- .travis/check_relevant_ci.sh | 7 ------ .travis/install_ci.sh | 16 ------------- CHANGELOG.md | 1 + 7 files changed, 25 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/gitlab-actions.yml delete mode 100644 .travis.yml delete mode 100755 .travis/after_success_ci.sh delete mode 100755 .travis/before_install_ci.sh delete mode 100755 .travis/check_relevant_ci.sh delete mode 100755 .travis/install_ci.sh diff --git a/.github/workflows/gitlab-actions.yml b/.github/workflows/gitlab-actions.yml new file mode 100644 index 0000000..aadeace --- /dev/null +++ b/.github/workflows/gitlab-actions.yml @@ -0,0 +1,24 @@ +name: Tests + +on: + push: + pull_request: + schedule: + - cron: '0 1 * * *' + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + php: [ '7.2', '7.3', '7.4' ] + steps: + - uses: actions/checkout@v2 + - name: Setup PHP with tools + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer + ini-values: php_memory_limit=3072M + - run: make app-install + - run: make ci diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 69819b7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: php - -branches: - only: - - master - -php: - - '7.2' - - '7.3' - - '7.4' - -env: - global: - - COMPOSER_MEMORY_LIMIT=-1 - - TARGET=ci - -dist: trusty -sudo: false - -cache: - directories: - - $HOME/.composer/cache/files - -before_install: - - composer self-update - - if [ -x .travis/before_install_${TARGET}.sh ]; then .travis/before_install_${TARGET}.sh; fi; - -install: - - if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi; - -script: - - make $TARGET - -after_success: - - if [ -x .travis/after_success_${TARGET}.sh ]; then .travis/after_success_${TARGET}.sh; fi; diff --git a/.travis/after_success_ci.sh b/.travis/after_success_ci.sh deleted file mode 100755 index 8715851..0000000 --- a/.travis/after_success_ci.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -set -ev - -coveralls -v diff --git a/.travis/before_install_ci.sh b/.travis/before_install_ci.sh deleted file mode 100755 index 54a9fc4..0000000 --- a/.travis/before_install_ci.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh -set -ev - -PHP_INI_DIR="$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/" -TRAVIS_INI_FILE="$PHP_INI_DIR/travis.ini" -echo "memory_limit=3072M" >> "$TRAVIS_INI_FILE" - -sed --in-place "s/\"dev-master\":/\"dev-${TRAVIS_COMMIT}\":/" composer.json diff --git a/.travis/check_relevant_ci.sh b/.travis/check_relevant_ci.sh deleted file mode 100755 index b3cc689..0000000 --- a/.travis/check_relevant_ci.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -set -ev - -RELEVANT_FILES=$(git diff --name-only HEAD upstream/${TRAVIS_BRANCH} -- '*.php' '*.yml' '*.xml' '*.twig' '*.js' '*.css' '*.json') - -if [[ -z ${RELEVANT_FILES} ]]; then echo -n 'KO'; exit 0; fi; - diff --git a/.travis/install_ci.sh b/.travis/install_ci.sh deleted file mode 100755 index 2274828..0000000 --- a/.travis/install_ci.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh -set -ev - -mkdir --parents "${HOME}/bin" - -# Coveralls client install -wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar --output-document="${HOME}/bin/coveralls" -chmod u+x "${HOME}/bin/coveralls" - -# To be removed when these issues are resolved: -# https://github.com/composer/composer/issues/5355 -if [ "${COMPOSER_FLAGS}" = '--prefer-lowest' ]; then - composer update --prefer-dist --no-interaction --prefer-stable --quiet -fi - -composer update --prefer-dist --no-interaction --prefer-stable ${COMPOSER_FLAGS} diff --git a/CHANGELOG.md b/CHANGELOG.md index b3c3f96..f8e3dff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ master * Add support to PHPStan extension installer * Add sonata-project/datagrid-bundle as direct dependency * Switch to the new security checker +* Migrate from Travis to GitHub Actions v0.2.0 ------