Skip to content

Commit e67f49a

Browse files
committed
Add GitHub tests
1 parent 13853cc commit e67f49a

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Run tests
2+
3+
on: [push]
4+
5+
jobs:
6+
test-php:
7+
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0"]
12+
os: [ubuntu-latest]
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Use php ${{ matrix.php-version }}
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: ${{ matrix.php-version }}
19+
extensions: posix, mbstring
20+
coverage: xdebug
21+
tools: composer:v2
22+
- name: Cache module
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.composer/cache/
26+
key: composer-cache
27+
- name: Install dependencies
28+
if: ${{ matrix.php-version != '8.0' }}
29+
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest
30+
- name: Install dependencies for php 8.0
31+
if: ${{ matrix.php-version == '8.0' }}
32+
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
33+
- name: Run php tests
34+
run: composer run test
35+
- name: Send coverage
36+
uses: codecov/codecov-action@v1

0 commit comments

Comments
 (0)