Skip to content

Commit 9bd0e4a

Browse files
authored
GH Actions (#10)
1 parent eee8c66 commit 9bd0e4a

File tree

6 files changed

+1877
-610
lines changed

6 files changed

+1877
-610
lines changed

.github/workflows/php.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,31 @@ jobs:
1414

1515
runs-on: ubuntu-latest
1616

17+
strategy:
18+
matrix:
19+
php-version: [ '7.3', '7.4', '8.0', '8.1', '8.2' ]
20+
1721
steps:
18-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v3
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php-version }}
28+
extensions: ast
1929

20-
# - name: Validate composer.json and composer.lock
21-
# run: composer validate --strict
30+
- name: Install dependencies
31+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
2232

23-
- name: Cache Composer packages
24-
id: composer-cache
25-
uses: actions/cache@v3
26-
with:
27-
path: vendor
28-
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29-
restore-keys: |
30-
${{ runner.os }}-php-
33+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
34+
# Docs: https://getcomposer.org/doc/articles/scripts.md
3135

32-
- name: Install dependencies
33-
run: composer install --prefer-dist --no-progress
36+
- name: Run test suite
37+
run: composer run-script test
3438

35-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36-
# Docs: https://getcomposer.org/doc/articles/scripts.md
39+
- name: Run phan
40+
run: composer phan
3741

38-
- name: Run test suite
39-
run: composer run-script test
42+
- name: phan analysis
43+
run: cat analysis.txt
44+
if: failure()

.scrutinizer.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
build:
2+
image: default-bionic
3+
4+
environment:
5+
php:
6+
version: 8.1.18
7+
ini:
8+
xdebug.mode: coverage
29
nodes:
10+
analysis:
11+
tests:
12+
override:
13+
- php-scrutinizer-run
314
my-tests-with-coverage:
415
tests:
516
override:

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"minimum-stability": "dev",
1313
"prefer-stable": true,
1414
"require": {
15-
"php": ">=7.1",
15+
"php": ">=7.3",
1616
"psr/http-message": "^1.0"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^7.2",
19+
"phpunit/phpunit": "^9.5",
2020
"nyholm/psr7": "^1.3",
21-
"phan/phan": "^3.2"
21+
"phan/phan": "^5.4"
2222
},
2323
"autoload": {
2424
"psr-4": {

0 commit comments

Comments
 (0)