Skip to content

Commit 5eab40b

Browse files
authoredSep 27, 2020
Updated dependencies (#14)
* Updated dependencies * Lock phpspec to the lastest version * Added PHP CS Fixer, make test possible to fail at php 8.0 * Reduced phive trusted keys * Added composer.lock with latest dependencies to repo * Run locked install locked dependencies only at php 7.4 * Adjust github workflow syntax * Install locked dependencies only at php 7.4
1 parent 4c39029 commit 5eab40b

File tree

12 files changed

+2660
-69
lines changed

12 files changed

+2660
-69
lines changed
 

‎.gitattributes

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*.php text eol=lf
2+
*.phpt text eol=lf
3+
/composer.lock export-ignore
4+
/.github/ export-ignore
5+
/.phive/ export-ignore
6+
/spec export-ignore
7+
/.gitattributes export-ignore
8+
/.gitignore export-ignore
9+
/.php_cs export-ignore
10+
/phpstan.neon export-ignore
11+
/phpunit.xml export-ignore

‎.github/workflows/static-analyze.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "Static Analyze"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
schedule:
9+
- cron: '* 8 * * *'
10+
11+
jobs:
12+
compatibility:
13+
name: "Static Analyze"
14+
15+
runs-on: ${{ matrix.operating-system }}
16+
17+
strategy:
18+
matrix:
19+
dependencies:
20+
- "locked"
21+
php-version:
22+
- "7.4"
23+
operating-system:
24+
- "ubuntu-latest"
25+
26+
steps:
27+
- name: "Checkout"
28+
uses: "actions/checkout@v2"
29+
30+
- name: "Install PHP"
31+
uses: "shivammathur/setup-php@v2"
32+
with:
33+
coverage: "pcov"
34+
php-version: "${{ matrix.php-version }}"
35+
ini-values: memory_limit=-1
36+
tools: phive, composer:v2
37+
38+
- name: "Install tools"
39+
run: "phive install --trust-gpg-keys E82B2FB314E9906E"
40+
41+
- name: "Install lowest dependencies"
42+
if: ${{ matrix.dependencies == 'lowest' }}
43+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
44+
45+
- name: "Install highest dependencies"
46+
if: ${{ matrix.dependencies == 'highest' }}
47+
run: "composer update --no-interaction --no-progress --no-suggest"
48+
49+
- name: "Install locked dependencies"
50+
if: ${{ matrix.dependencies == 'locked' }}
51+
run: "composer install --no-interaction --no-progress --no-suggest"
52+
53+
- name: "Static Analyze"
54+
run: "composer static:analyze"

‎.github/workflows/testsuite.yml

+50-33
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,69 @@
1-
name: Tests
1+
name: "Tests"
22

33
on:
4-
push:
5-
branches:
6-
- master
74
pull_request:
5+
push:
86
branches:
9-
- master
7+
- "master"
8+
schedule:
9+
- cron: '* 8 * * *'
1010

1111
jobs:
12-
build:
13-
name: Tests
14-
runs-on: ubuntu-latest
12+
compatibility:
13+
name: "Tests"
14+
15+
runs-on: ${{ matrix.operating-system }}
1516

1617
strategy:
1718
matrix:
18-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
19-
php-versions: ['7.2', '7.3', '7.4']
19+
dependencies:
20+
- "locked"
21+
- "lowest"
22+
- "highest"
23+
php-version:
24+
- "8.0"
25+
- "7.4"
26+
- "7.3"
27+
- "7.2"
28+
operating-system:
29+
- "ubuntu-latest"
2030

2131
steps:
22-
- uses: actions/checkout@master
32+
- name: "Checkout"
33+
uses: "actions/checkout@v2"
2334

24-
- name: Setup PHP
25-
uses: shivammathur/setup-php@master
35+
- name: "Install PHP"
36+
uses: "shivammathur/setup-php@v2"
2637
with:
27-
php-version: ${{ matrix.php-versions }}
28-
coverage: none
38+
coverage: "pcov"
39+
php-version: "${{ matrix.php-version }}"
40+
ini-values: memory_limit=-1
41+
tools: phive, composer:v2
2942

30-
- name: Get Composer Cache Directory
31-
id: composer-cache
32-
run: |
33-
echo "::set-output name=dir::$(composer config cache-files-dir)"
43+
- name: "Install tools"
44+
run: "phive install --trust-gpg-keys E82B2FB314E9906E"
45+
continue-on-error: ${{ matrix.php-version == '8.0' }}
3446

35-
- uses: actions/cache@v1
36-
with:
37-
path: ${{ steps.composer-cache.outputs.dir }}
38-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
39-
restore-keys: |
40-
${{ runner.os }}-composer-
47+
- name: "Install lowest dependencies"
48+
if: ${{ matrix.dependencies == 'lowest' }}
49+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
50+
continue-on-error: ${{ matrix.php-version == '8.0' }}
4151

42-
- name: Install dependecies - lowest versions
43-
if: matrix.php-versions == '7.0'
44-
run: composer update --prefer-lowest
52+
- name: "Install highest dependencies"
53+
if: ${{ matrix.dependencies == 'highest'}}
54+
run: "composer update --no-interaction --no-progress --no-suggest"
55+
continue-on-error: ${{ matrix.php-version == '8.0' }}
4556

46-
- name: Install dependecies
47-
if: matrix.php-versions != '7.0'
48-
run: composer update --prefer-lowest
57+
- name: "Install locked dependencies"
58+
if: ${{ matrix.dependencies == 'locked' && matrix.php-version == '7.4' }}
59+
run: "composer install --no-interaction --no-progress --no-suggest"
60+
continue-on-error: ${{ matrix.php-version == '8.0' }}
4961

50-
- name: Run tests
51-
run: composer test
62+
- name: "Install highest dependencies"
63+
if: ${{ matrix.dependencies == 'locked' && matrix.php-version != '7.4' }}
64+
run: "composer update --no-interaction --no-progress --no-suggest"
65+
continue-on-error: ${{ matrix.php-version == '8.0' }}
5266

67+
- name: "Tests"
68+
run: "composer test"
69+
continue-on-error: ${{ matrix.php-version == '8.0' }}

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vendor/
22
bin/
3-
composer.lock
3+
tools/
44
.DS_Store
55
.idea

‎.phive/phars.xml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phive xmlns="https://phar.io/phive">
3+
<phar name="php-cs-fixer" version="^2.16.4" installed="2.16.4" location="./tools/php-cs-fixer" copy="true"/>
4+
</phive>

0 commit comments

Comments
 (0)