From 9ac51ac9550d85e5f07f83b8c85bfd930b6c7559 Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 19:24:57 +0100 Subject: [PATCH 1/2] chore: replace travis with github actions --- .coveralls.yml | 1 - .github/workflows/code_checks.yaml | 69 ++++++++++++++++++++++++++++++ .travis.yml | 29 ------------- composer.json | 1 - 4 files changed, 69 insertions(+), 31 deletions(-) delete mode 100644 .coveralls.yml create mode 100644 .github/workflows/code_checks.yaml delete mode 100644 .travis.yml diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index f6e9ef4..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -coverage_clover: build/logs/clover.xml diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml new file mode 100644 index 0000000..aeca8f2 --- /dev/null +++ b/.github/workflows/code_checks.yaml @@ -0,0 +1,69 @@ +# .github/workflows/code_checks.yaml +name: Code_Checks + +on: ["push", "pull_request"] + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] + stability: [ prefer-stable ] + include: + - php: '5.6' + stability: prefer-lowest + - php: '7.0' + - php: '7.1' + - php: '7.2' + - php: '7.3' + - php: '7.4' + - php: '8.0' + - php: '8.1' + - php: '8.2' + + name: PHP ${{ matrix.php }} - ${{ matrix.stability }} tests + steps: + - uses: actions/checkout@v3 + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: pcov, xdebug + coverage: xdebug + + - name: Install dependencies + run: | + composer update --prefer-dist --no-interaction + + - name: Execute tests + run: composer phpunit + + + cs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.1 + coverage: none + - run: composer install --no-progress + - run: composer checkstyle + + finish: + needs: tests + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 36d26b1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php -sudo: false - -env: - - XDEBUG_MODE=coverage - -php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - 8.0 - -before_install: - - composer self-update - -cache: - directories: - - $HOME/.composer/cache - -install: composer update --prefer-dist --no-interaction - -script: - - composer test - - composer analyze - -after_success: - - travis_retry php vendor/bin/php-coveralls diff --git a/composer.json b/composer.json index b9b960f..f5f72f9 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,6 @@ }, "require-dev": { "phpunit/phpunit": "*", - "php-coveralls/php-coveralls": "^2.4.3", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { From 832bbced5e830833cf4d2f9e03b9f5d667a80f1a Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Tue, 14 Feb 2023 19:29:44 +0100 Subject: [PATCH 2/2] chore: replace travis with github actions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f5f72f9..88686ad 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "psr/cache": "^1.0||^2.0||^3.0" }, "require-dev": { - "phpunit/phpunit": "*", + "phpunit/phpunit": "^5.7||^6.5||^7.5||^8.5||^9.5", "squizlabs/php_codesniffer": "^3.5" }, "autoload": {