Skip to content

Commit e330d49

Browse files
committed
Add GH Actions CI and linting
1 parent 4a1f07f commit e330d49

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
env:
8+
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
9+
SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT: "1"
10+
11+
jobs:
12+
tests:
13+
name: "CI"
14+
15+
runs-on: ubuntu-latest
16+
continue-on-error: ${{ matrix.experimental }}
17+
18+
strategy:
19+
matrix:
20+
php-version:
21+
- "5.3"
22+
- "5.4"
23+
- "5.5"
24+
- "5.6"
25+
- "7.0"
26+
- "7.1"
27+
- "7.2"
28+
- "7.3"
29+
- "7.4"
30+
# - "8.0"
31+
dependencies: [highest]
32+
experimental: [false]
33+
include:
34+
- php-version: "5.3"
35+
dependencies: highest
36+
experimental: false
37+
- php-version: "5.3"
38+
dependencies: lowest
39+
experimental: false
40+
# - php-version: "8.0"
41+
# dependencies: highest
42+
# experimental: false
43+
# - php-version: "8.1"
44+
# dependencies: lowest-ignore
45+
# experimental: true
46+
# - php-version: "8.1"
47+
# dependencies: highest-ignore
48+
# experimental: true
49+
50+
steps:
51+
- name: "Checkout"
52+
uses: "actions/checkout@v2"
53+
54+
- name: "Install PHP"
55+
uses: "shivammathur/setup-php@v2"
56+
with:
57+
coverage: "none"
58+
extensions: "intl, zip"
59+
ini-values: "memory_limit=-1, phar.readonly=0, error_reporting=E_ALL, display_errors=On"
60+
php-version: "${{ matrix.php-version }}"
61+
tools: composer
62+
63+
- name: "Handle lowest dependencies update"
64+
if: "contains(matrix.dependencies, 'lowest')"
65+
run: "echo \"COMPOSER_UPDATE_FLAGS=$COMPOSER_UPDATE_FLAGS --prefer-lowest\" >> $GITHUB_ENV"
66+
67+
- name: "Handle ignore-platform-reqs dependencies update"
68+
if: "contains(matrix.dependencies, 'ignore')"
69+
run: "echo \"COMPOSER_FLAGS=$COMPOSER_FLAGS --ignore-platform-req=php\" >> $GITHUB_ENV"
70+
71+
- name: "Update dependencies"
72+
run: "composer update ${{ env.COMPOSER_UPDATE_FLAGS }} ${{ env.COMPOSER_FLAGS }}"
73+
74+
- name: "Validate composer.json"
75+
run: "composer validate"
76+
77+
- name: "Run tests"
78+
run: "composer test"
79+
80+

0 commit comments

Comments
 (0)