Skip to content

Commit 3db435a

Browse files
committed
Add github actions
1 parent 679ae85 commit 3db435a

File tree

4 files changed

+130
-0
lines changed

4 files changed

+130
-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: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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.0'
19+
coverage: xdebug
20+
21+
- name: Setup Problem Matchers for PHPUnit
22+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
23+
24+
- name: Checkout code
25+
uses: actions/checkout@v1
26+
27+
- name: Download dependencies
28+
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest --prefer-lowest
29+
30+
- name: Run tests
31+
run: composer test-ci
32+
33+
build:
34+
name: Build
35+
runs-on: ubuntu-latest
36+
strategy:
37+
max-parallel: 10
38+
matrix:
39+
php: ['7.0', '7.1', '7.2', '7.3', '7.4']
40+
41+
steps:
42+
- name: Set up PHP
43+
uses: shivammathur/[email protected]
44+
with:
45+
php-version: ${{ matrix.php }}
46+
47+
- name: Setup Problem Matchers for PHPUnit
48+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
49+
50+
- name: Checkout code
51+
uses: actions/checkout@v1
52+
53+
- name: Download dependencies
54+
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress --no-suggest
55+
56+
- name: Run tests
57+
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)