From 37d5e451ca791d45b7075e1b2c3efeb18b9718a2 Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Mon, 14 Dec 2020 16:15:55 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20move=20CI=20to=20Github=20Action?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 1 - .github/workflows/build.yaml | 44 ++++++++++++++++++++++++++++++++++++ .travis.yml | 20 ---------------- 3 files changed, 44 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/build.yaml delete mode 100644 .travis.yml diff --git a/.gitattributes b/.gitattributes index 02e18029..11872570 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,7 +2,6 @@ .github export-ignore .gitignore export-ignore .php_cs export-ignore -.travis.yml export-ignore CHANGELOG.md export-ignore CODE_OF_CONDUCT.md export-ignore CONTRIBUTING.md export-ignore diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..691dd709 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,44 @@ +name: Build + +on: + pull_request: ~ + push: ~ + +jobs: + tests: + runs-on: ubuntu-20.04 + strategy: + matrix: + php: + - '7.3' + - '7.4' + - '8.0' + include: + - description: 'Symfony 4.4' + php: '7.3' + composer_option: '--prefer-lowest' + - description: 'Symfony 5.1' + php: '7.4' + symfony: 5.1.* + - description: 'Symfony 5.2' + php: '8.0' + symfony: 5.2.* + name: PHP ${{ matrix.php }} tests (${{ matrix.description }}) + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cache + uses: actions/cache@v2 + with: + path: ~/.composer/cache/files + key: ${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.composer_option }} + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + - run: | + sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json; + if: matrix.symfony + - run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_option }} + - run: vendor/bin/phpunit + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dfbf6c1a..00000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: php - -jobs: - include: - - php: 7.3 - env: SYMFONY_VERSION='4.4.*' - - php: 7.4 - env: SYMFONY_VERSION='5.1.*' - - php: 8.0snapshot - env: SYMFONY_VERSION='5.2.*' - -before_script: - - | - if [ "$SYMFONY_VERSION" != "" ]; then - sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'$SYMFONY_VERSION'"/' composer.json; - fi; - - if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi; - - composer install --dev - -script: vendor/bin/phpunit