Skip to content

Commit

Permalink
Upgrade php versions (#10)
Browse files Browse the repository at this point in the history
* Upgrade php versions
  • Loading branch information
pvsaintpe authored Apr 25, 2024
1 parent 6377fe1 commit c8c491f
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 143 deletions.
3 changes: 0 additions & 3 deletions .coveralls.yml

This file was deleted.

82 changes: 12 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
name: CI

on:
on:
push:
pull_request:

env:
php_extensions: 'dom, iconv, intl, json, mbstring, opcache, pcntl, pcov, session, simplexml, xml, zip'
key: cache-v0.1

jobs:
jobs:
lint:
runs-on: '${{ matrix.operating_system }}'
timeout-minutes: 20
strategy:
timeout-minutes: 20
strategy:
matrix:
operating_system:
- ubuntu-latest
php_versions:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
fail-fast: false
env:
env:
PHP_CS_FIXER_FUTURE_MODE: '0'
name: 'Lint PHP'
steps:
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Setup cache environment'
Expand All @@ -39,11 +42,11 @@ jobs:
key: '${{ steps.cache-env.outputs.key }}'
restore-keys: '${{ steps.cache-env.outputs.key }}'
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: '${{ env.php_extensions }}'
ini-values: memory_limit=-1
ini-values: memory_limit=-1
tools: pecl, composer
coverage: none
- name: 'Setup problem matchers for PHP (aka PHP error logs)'
Expand All @@ -55,64 +58,3 @@ jobs:
working-directory: './'
- name: 'Linting PHP source files'
run: 'vendor/bin/ecs check --config=ecs.php .'
test:
strategy:
fail-fast: false
matrix:
operating_system:
- ubuntu-latest
php_versions:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
runs-on: '${{ matrix.operating_system }}'
name: 'Test / PHP ${{ matrix.php_versions }}'
needs:
- lint
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Setup cache environment'
id: cache-env
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php_versions }}
extensions: ${{ env.php_extensions }}
key: '${{ env.key }}'
- name: 'Cache extensions'
uses: actions/cache@v1
with:
path: '${{ steps.cache-env.outputs.dir }}'
key: '${{ steps.cache-env.outputs.key }}'
restore-keys: '${{ steps.cache-env.outputs.key }}'
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: ${{ env.php_extensions }}
ini-values: 'pcov.directory=src, date.timezone=UTC, upload_max_filesize=20M, post_max_size=20M, memory_limit=512M, short_open_tag=Off'
coverage: pcov
tools: 'phpunit'
- name: 'Install PHP dependencies with Composer'
run: composer install --prefer-dist --no-progress --no-suggest --optimize-autoloader
working-directory: './'
- name: 'Run Unit Tests with PHPUnit'
run: './vendor/bin/phpunit --verbose --stderr --configuration phpunit.github.xml --coverage-clover build/logs/clover.xml --coverage-text'
working-directory: './'
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: php-${{ matrix.php_versions }}
run: ./vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
coverage:
needs: test
runs-on: ubuntu-latest
name: "Code coverage"
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
}
],
"require": {
"php": "^7.2|^7.3|^7.4|^8.0",
"php": "^7.4|^8.0|^8.1|^8.2",
"ext-json": "*",
"laravel/framework": "^5.8|^6.0|^7.0|^8.0|^9.0",
"hemp/presenter": "^2.0"
"laravel/framework": "^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.9",
"hemp/presenter": "^2.0|^3.0"
},
"require-dev": {
"umbrellio/code-style-php": "^1.0",
"orchestra/testbench": "^3.5|^4.0|^5.0|^6.0",
"orchestra/testbench": "^3.5|^4.0|^5.0|^6.0|^7.0|^8.0|^9.0",
"symplify/easy-coding-standard": "^9.3.15",
"php-coveralls/php-coveralls": "^2.1"
},
Expand Down
19 changes: 0 additions & 19 deletions phpunit.github.xml

This file was deleted.

21 changes: 0 additions & 21 deletions phpunit.xml.dist

This file was deleted.

6 changes: 0 additions & 6 deletions tests.sh

This file was deleted.

9 changes: 0 additions & 9 deletions tests/FunctionalTestCase.php

This file was deleted.

11 changes: 0 additions & 11 deletions tests/TestCase.php

This file was deleted.

Empty file removed tests/_data/Helpers/.gitkeep
Empty file.
Empty file removed tests/_data/Models/.gitkeep
Empty file.
Empty file removed tests/_data/Presenters/.gitkeep
Empty file.
Empty file removed tests/unit/.gitkeep
Empty file.

0 comments on commit c8c491f

Please sign in to comment.