From df1503f7ecd5292d1fd04135c8d08d882e9d9d13 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Wed, 10 Nov 2021 09:47:13 +0900 Subject: [PATCH 1/3] Create continuous-integration.yml --- .github/workflows/continuous-integration.yml | 57 ++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/continuous-integration.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 00000000..987f1401 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,57 @@ +name: Continuous Integration + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + operating-system: + - ubuntu-latest + php-version: + - '5.6' + - '7.0' + - '7.1' + - '7.2' + - '7.3' + - '7.4' + - '8.0' + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Setup PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: none + tools: none + ini-values: assert.exception=1, zend.assertions=1 + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies (5.6 and 7.x) + if: ${{ matrix.php-version != '8.0' }} + run: composer install --no-interaction --prefer-dist + + - name: Install dependencies (8.0) + if: ${{ matrix.php-version == '8.0' }} + run: composer install --no-interaction --prefer-dist --ignore-platform-req=php + + - name: Run test suite + run: ./vendor/bin/phpunit From 7f61f1512a76af3364001bbbc572a8bf67c33bb5 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Wed, 10 Nov 2021 10:01:17 +0900 Subject: [PATCH 2/3] Remove .travis.yml --- .travis.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d4a8f1de..00000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -dist: trusty -language: php -php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 7.4 -before_script: - - composer self-update -install: - - composer install -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.clover -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover -jobs: - include: - - stage: Test - name: PHP 8 - php: nightly - install: composer install --ignore-platform-reqs From b3d3657194e9cbc77a4272119a118377624160fd Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Wed, 10 Nov 2021 10:32:02 +0900 Subject: [PATCH 3/3] Fix .scrutinizer.yml to run Remove tools and add php-scrutinizer-run. --- .scrutinizer.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 7c7c8454..552f1f29 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,10 +1,8 @@ +build: + nodes: + analysis: + tests: + override: + - php-scrutinizer-run filter: paths: ["src/*"] -tools: - external_code_coverage: true - php_code_coverage: true - php_sim: true - php_mess_detector: true - php_pdepend: true - php_analyzer: true - php_cpd: true