Skip to content

Commit

Permalink
Updated php-cs-fixer to the latest version (#2)
Browse files Browse the repository at this point in the history
* Updated php-cs-fixer to the latest version

* Added static analyze github workflow

* Updated php-matcher to the latest version that suports php8
  • Loading branch information
norberttech authored Dec 29, 2020
1 parent b7e962a commit 2b2b703
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 13 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/static-analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "Static Analyze"

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

jobs:
static-analyze:
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
tools: phive, composer:v2
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1

- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
tools
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: "Install tools"
run: "phive install --trust-gpg-keys E82B2FB314E9906E,C5095986493B4AA0,CF1A108D0E7AE720,8A03EA3B385DBAA1,D0254321FB74703A,4AA394086372C20A --force-accept-unsigned"

- name: "Static Analyze"
run: "composer static:analyze"
2 changes: 1 addition & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="php-cs-fixer" version="^2.17.1" installed="2.17.1" location="./tools/php-cs-fixer" copy="true"/>
<phar name="php-cs-fixer" version="^2.17.3" installed="2.17.3" location="./tools/php-cs-fixer" copy="true"/>
<phar name="phpunit" version="^9.5.0" installed="9.5.0" location="./tools/phpunit.phar" copy="true"/>
<phar name="humbug/box" version="^3.8.4" installed="3.8.4" location="./tools/box" copy="true"/>
</phive>
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@
"symfony/cache": "^5.2"
},
"require-dev": {
"coduo/php-matcher": "^5.0"
"coduo/php-matcher": "6.x@dev"
},
"scripts": {
"build": [
"@test"
],
"test": [
"@static:analyze",
"tools\/phpunit.phar"
],
"static:analyze": [
Expand Down
23 changes: 13 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2b2b703

Please sign in to comment.