Skip to content

Commit

Permalink
Update dependencies (#2)
Browse files Browse the repository at this point in the history
* Update dependencies
- spatie/typescript-transformer v2.0 (dependency of PHP 8.0 min) and
- bensampo/laravel-enum to ^4.0
- symplify/easy-coding-standard-prefixed to ^9.3

* Update CI to PHP 8.0, resolve dependency contentions, add dev dependancy for scrutinizer/ocular and update the Scrutinizer environment.
  • Loading branch information
securit authored Dec 7, 2021
1 parent aaa062d commit bac5424
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
43 changes: 20 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,41 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:

test:
timeout-minutes: 15
runs-on: ubuntu-latest
env:
SCRUTINIZER_ACCESS_TOKEN: ${{secrets.SCRUTINIZER_ACCESS_TOKEN}}
runs-on: ubuntu-latest
COMPOSER_AUTH: ${{secrets.REPMAN_COMPOSER_AUTH}}
steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.0
extensions: dom, bcmath, curl, libxml, gettext, exif, iconv, intl, mbstring, gd, imagick, soap, sockets, zip, pcntl, pdo, mysql, pdo_mysql
coverage: pcov

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer update --no-progress --optimize-autoloader --prefer-dist

- name: Coding Standard
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
env:
COMPOSER_AUTH: ${{secrets.REPMAN_COMPOSER_AUTH}}
- name: PHP Coding Standards
run: composer run ecs-check

- name: Run Tests
run: composer run test

- name: Run Tests including coverage
run: composer run coverage
- name: Upload Coverage report
run: |
curl -L https://scrutinizer-ci.com/ocular.phar > ./ocular.phar
php ocular.phar code-coverage:upload --access-token="${SCRUTINIZER_ACCESS_TOKEN}" --format=php-clover ./build/clover.xml
run: vendor/bin/ocular code-coverage:upload --access-token="${SCRUTINIZER_ACCESS_TOKEN}" --format=php-clover ./coverage.clover
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ checks:
build:
environment:
php:
version: 7.4.0
version: 8.0
nodes:
analysis:
cache:
Expand Down
16 changes: 9 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
}
],
"require" : {
"php" : "^7.4|^8.0",
"php" : "^8.0",
"ext-json": "*",
"spatie/typescript-transformer" : "^1.1",
"bensampo/laravel-enum": "^2.0|^3.0"
"spatie/typescript-transformer" : "^2.1.0",
"bensampo/laravel-enum": "^4.1.0"
},
"require-dev" : {
"phpunit/phpunit": "^9.5",
"spatie/phpunit-snapshot-assertions": "^4.2",
"symplify/easy-coding-standard-prefixed": "^8.3"
"phpunit/phpunit": "^9.5.10",
"spatie/phpunit-snapshot-assertions": "^4.2.9",
"symplify/easy-coding-standard": "^9.4",
"scrutinizer/ocular": "^1.8.1"
},
"autoload" : {
"psr-4" : {
Expand All @@ -42,7 +43,8 @@
"scripts" : {
"test" : "vendor/bin/phpunit",
"ecs-check" : "vendor/bin/ecs check",
"ecs-fix" : "vendor/bin/ecs check --fix"
"ecs-fix" : "vendor/bin/ecs check --fix",
"coverage" : "vendor/bin/phpunit --coverage-clover=./coverage.clover -v"
},
"config" : {
"sort-packages" : true
Expand Down

0 comments on commit bac5424

Please sign in to comment.