Skip to content

Commit 63e19e1

Browse files
authored
Create php.yml
1 parent 34f6e20 commit 63e19e1

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/php.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Validate composer.json and composer.lock
18+
run: composer validate
19+
20+
- name: Cache Composer packages
21+
id: composer-cache
22+
uses: actions/cache@v2
23+
with:
24+
path: vendor
25+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}-php-
28+
29+
- name: Install dependencies
30+
if: steps.composer-cache.outputs.cache-hit != 'true'
31+
run: |
32+
make install
33+
composer require symfony/yaml:"${YAML}" --prefer-dist --no-interaction
34+
35+
- name: Validate test data
36+
run: make lint
37+
38+
- name: PHP Stan analysis
39+
run: make stan
40+
41+
- name: PHPUnit tests
42+
run: make test
43+
44+
- name: Check code style
45+
run: make check-style
46+
47+
- name: Code coverage
48+
run: make coverage

0 commit comments

Comments
 (0)