Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Jul 6, 2020
1 parent 1e6e829 commit 78ff3cd
Show file tree
Hide file tree
Showing 7 changed files with 4,808 additions and 27 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/static-analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "Static Analyze"

on:
pull_request:
push:
branches:
- "1.x"
schedule:
- cron: '* 8 * * *'

jobs:
compatibility:
name: "Static Analyze"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "7.4"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Static Analyze"
run: "composer static:analyze"
64 changes: 64 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "Tests"

on:
pull_request:
push:
branches:
- "1.x"
schedule:
- cron: '* 8 * * *'

jobs:
compatibility:
name: "Tests"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "locked"
- "lowest"
- "highest"
php-version:
- "7.4"
- "7.3"
- "7.2"
operating-system:
- "ubuntu-latest"
- "windows-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Tests"
run: "composer test"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
vendor/
bin/
composer.lock
var/
.DS_Store
.idea
.phpunit.result.cache
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
"openlss/lib-array2xml": "^1.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.4",
"phpstan/phpstan": "^0.12.32",
"phpunit/phpunit": "^8.4",
"friendsofphp/php-cs-fixer": "^2.4"
"rector/rector-prefixed": "^0.7.43"
},
"autoload": {
"psr-4": {
Expand All @@ -46,8 +48,11 @@
"php-cs-fixer fix --using-cache=no"
],
"test" : [
"phpunit",
"php-cs-fixer fix -v --dry-run"
"phpunit"
],
"static:analyze": [
"phpstan analyze -c phpstan.neon",
"php-cs-fixer fix --dry-run"
]
},
"extra": {
Expand Down
Loading

0 comments on commit 78ff3cd

Please sign in to comment.