Skip to content

Commit 1fd5c2c

Browse files
committed
Add github actions
1 parent 03ea4f1 commit 1fd5c2c

File tree

4 files changed

+132
-0
lines changed

4 files changed

+132
-0
lines changed

.github/workflows/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.yml]
2+
indent_size = 2

.github/workflows/checks.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
composer-normalize:
11+
name: Composer Normalize
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v1
17+
18+
- name: Install
19+
uses: docker://composer
20+
with:
21+
args: install
22+
23+
- name: Normalize
24+
uses: docker://composer
25+
with:
26+
args: composer normalize --dry-run
27+
28+
roave-bc-check:
29+
name: Roave BC Check
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v1
35+
36+
- name: Roave BC Check
37+
uses: docker://nyholm/roave-bc-check-ga

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build-lowest-version:
11+
name: Build lowest version
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Set up PHP
16+
uses: shivammathur/[email protected]
17+
with:
18+
php-version: '7.1'
19+
coverage: xdebug
20+
extensions: mbstring
21+
22+
- name: Setup Problem Matchers for PHPUnit
23+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
24+
25+
- name: Checkout code
26+
uses: actions/checkout@v1
27+
28+
- name: Download dependencies
29+
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest --prefer-lowest
30+
31+
- name: Run tests
32+
run: composer test-ci
33+
34+
build:
35+
name: Build
36+
runs-on: ubuntu-latest
37+
strategy:
38+
max-parallel: 10
39+
matrix:
40+
php: ['7.1', '7.2', '7.3', '7.4']
41+
42+
steps:
43+
- name: Set up PHP
44+
uses: shivammathur/[email protected]
45+
with:
46+
php-version: ${{ matrix.php }}
47+
extensions: mbstring
48+
49+
- name: Setup Problem Matchers for PHPUnit
50+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
51+
52+
- name: Checkout code
53+
uses: actions/checkout@v1
54+
55+
- name: Download dependencies
56+
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest
57+
58+
- name: Run tests
59+
run: composer test

.github/workflows/static.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Static analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
phpstan:
11+
name: PHPStan
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v1
17+
18+
- name: PHPStan
19+
uses: docker://oskarstark/phpstan-ga
20+
with:
21+
args: analyze --no-progress
22+
23+
php-cs-fixer:
24+
name: PHP-CS-Fixer
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v1
30+
31+
- name: PHP-CS-Fixer
32+
uses: docker://oskarstark/php-cs-fixer-ga
33+
with:
34+
args: --dry-run --diff-format udiff

0 commit comments

Comments
 (0)