Skip to content

Commit 1d97b71

Browse files
committed
Add github actions
1 parent b22cab5 commit 1d97b71

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/phpunit.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: "PHPUnit tests"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
9+
jobs:
10+
phpunit:
11+
name: "PHPUnit tests"
12+
13+
runs-on: ${{ matrix.operating-system }}
14+
15+
strategy:
16+
matrix:
17+
dependencies:
18+
- "lowest"
19+
- "highest"
20+
php-version:
21+
- "5.6"
22+
- "7.0"
23+
- "7.1"
24+
- "7.2"
25+
- "7.3"
26+
- "7.4"
27+
- "8.0"
28+
operating-system:
29+
- "ubuntu-latest"
30+
31+
steps:
32+
- name: "Checkout"
33+
uses: "actions/checkout@v2"
34+
35+
- name: "Install PHP"
36+
uses: "shivammathur/setup-php@v2"
37+
with:
38+
coverage: "pcov"
39+
php-version: "${{ matrix.php-version }}"
40+
ini-values: memory_limit=-1
41+
tools: composer:v2
42+
43+
- name: "Install lowest dependencies"
44+
if: ${{ matrix.dependencies == 'lowest' }}
45+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
46+
47+
- name: "Install highest dependencies"
48+
if: ${{ matrix.dependencies == 'highest' }}
49+
run: "composer update --no-interaction --no-progress --no-suggest"
50+
51+
- name: "Tests"
52+
run: "vendor/bin/phpunit"

0 commit comments

Comments
 (0)