Skip to content

Commit 17993fc

Browse files
committed
Add PHP workflows
1 parent d9b2dda commit 17993fc

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/php.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PHP Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Install PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
extensions: imagick
23+
- name: Validate composer.json and composer.lock
24+
run: composer validate
25+
- name: Install dependencies
26+
run: composer install --prefer-dist --no-progress
27+
- name: Run PHPCS
28+
run: composer run-script lint
29+
- name: Run PHPUnit
30+
run: composer run-script test

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@
1717
},
1818
"autoload": {
1919
"psr-4": { "TraderInteractive\\Util\\": "src" }
20+
},
21+
"scripts": {
22+
"lint": "vendor/bin/phpcs",
23+
"test": "vendor/bin/phpunit"
2024
}
2125
}

0 commit comments

Comments
 (0)