File tree Expand file tree Collapse file tree 4 files changed +113
-38
lines changed
Expand file tree Collapse file tree 4 files changed +113
-38
lines changed Original file line number Diff line number Diff line change 1+ name : " Lint composer.json"
2+
3+ on :
4+ pull_request :
5+ push :
6+
7+ jobs :
8+ composer-lint :
9+ name : " Lint composer.json"
10+
11+ runs-on : ${{ matrix.operating-system }}
12+
13+ strategy :
14+ matrix :
15+ php-version :
16+ - " 7.4"
17+ operating-system :
18+ - " ubuntu-latest"
19+
20+ steps :
21+ - name : " Checkout"
22+ uses : " actions/checkout@v2"
23+
24+ - name : " Install PHP"
25+ uses : " shivammathur/setup-php@v2"
26+ with :
27+ coverage : " none"
28+ php-version : " ${{ matrix.php-version }}"
29+ ini-values : memory_limit=-1
30+ tools : composer:v2, composer-normalize, composer-require-checker
31+
32+ - name : Get composer cache directory
33+ id : composer-cache
34+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
35+
36+ - name : " Cache dependencies"
37+ uses : " actions/cache@v2"
38+ with :
39+ path : ${{ steps.composer-cache.outputs.dir }}
40+ key : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
41+ restore-keys : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
42+
43+ - name : " Install dependencies"
44+ run : " composer install --no-interaction --no-progress"
45+
46+ - name : " Validate composer.json"
47+ run : " composer validate --strict"
48+
49+ - name : " Normalize composer.json"
50+ run : " composer-normalize --dry-run"
51+
52+ - name : " Check composer.json explicit dependencies"
53+ run : " composer-require-checker check"
Original file line number Diff line number Diff line change 1+ name : " PHP-CS-Fixer checks"
2+
3+ on :
4+ pull_request :
5+ push :
6+
7+ jobs :
8+ php-cs-fixer :
9+ name : " PHP-CS-Fixer"
10+
11+ runs-on : ${{ matrix.operating-system }}
12+
13+ strategy :
14+ matrix :
15+ php-version :
16+ - " 7.1"
17+ - " 7.2"
18+ - " 7.3"
19+ - " 7.4"
20+ operating-system :
21+ - " ubuntu-latest"
22+
23+ steps :
24+ - name : " Checkout"
25+ uses : " actions/checkout@v2"
26+
27+ - name : " Install PHP"
28+ uses : " shivammathur/setup-php@v2"
29+ with :
30+ coverage : " none"
31+ php-version : " ${{ matrix.php-version }}"
32+ ini-values : memory_limit=-1
33+ tools : composer:v2, cs2pr
34+
35+ - name : Get composer cache directory
36+ id : composer-cache
37+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
38+
39+ - name : " Cache dependencies"
40+ uses : " actions/cache@v2"
41+ with :
42+ path : ${{ steps.composer-cache.outputs.dir }}
43+ key : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
44+ restore-keys : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
45+
46+ - name : " Install dependencies"
47+ run : " composer install --no-interaction --no-progress"
48+
49+
50+ - name : " Lint PHP files"
51+ run : " find src -name *.php | xargs -n 1 php -l"
52+
53+ - name : " Check coding standards"
54+ run : " vendor/bin/php-cs-fixer fix -v --dry-run"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
22 "name" : " mollie/php-coding-standards" ,
3+ "type" : " library" ,
34 "description" : " Contains PHP coding standards like rules for PHP-CS-Fixer that serves for purpose of standardization." ,
45 "license" : " BSD-2-Clause" ,
5- "type" : " library" ,
66 "authors" : [
77 {
88 "name" : " Mollie B.V." ,
99 "email" : " info@mollie.com"
1010 }
1111 ],
12+ "require" : {
13+ "php" : " ^7.1.3" ,
14+ "friendsofphp/php-cs-fixer" : " ^2.16"
15+ },
1216 "autoload" : {
1317 "psr-4" : {
1418 "Mollie\\ PhpCodingStandards\\ " : " src/"
1519 }
1620 },
17- "minimum-stability" : " stable" ,
18- "require" : {
19- "php" : " ^7.1.3" ,
20- "friendsofphp/php-cs-fixer" : " ^2.16"
21- }
21+ "minimum-stability" : " stable"
2222}
You can’t perform that action at this time.
0 commit comments