Skip to content

Commit 1d28b2d

Browse files
Try workflows
1 parent 326bbe7 commit 1d28b2d

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
name: PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }}
12+
runs-on: ubuntu-18.04
13+
14+
strategy:
15+
matrix:
16+
php-version:
17+
- 7.4
18+
- 8.0
19+
dependencies: [highest]
20+
include:
21+
- php-version: 7.2
22+
dependencies: lowest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
28+
- name: Install PHP with extensions
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php-version }}
32+
coverage: pcov
33+
tools: composer:v2
34+
35+
- name: Install Composer dependencies (PHP 7 ${{ matrix.dependencies }})
36+
if: matrix.php-version != '8.0'
37+
uses: ramsey/composer-install@v1
38+
with:
39+
dependency-versions: ${{ matrix.dependencies }}
40+
composer-options: --prefer-dist --prefer-stable
41+
42+
- name: Install Composer dependencies (PHP 8 ${{ matrix.dependencies }})
43+
if: matrix.php-version == '8.0'
44+
uses: ramsey/composer-install@v1
45+
with:
46+
dependency-versions: ${{ matrix.dependencies }}
47+
composer-options: --prefer-dist --prefer-stable --ignore-platform-reqs
48+
49+
- name: Perform syntax check
50+
run: ant lint
51+
52+
- name: Find coding standard violations using PHP Code Sniffer
53+
run: ant phpcs
54+
55+
- name: Run unit tests with PHPUnit
56+
run: ant phpunit

0 commit comments

Comments
 (0)