Skip to content

Commit 3137947

Browse files
authored
added github-ci tests workflow
1 parent 521b4d6 commit 3137947

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
run:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
max-parallel: 2
16+
matrix:
17+
php:
18+
- 7.3
19+
- 7.4
20+
- 8.0
21+
- 8.1
22+
os:
23+
- ubuntu-latest
24+
- windows-latest
25+
- macOS-latest
26+
name: PHP ${{ matrix.php }}; ${{ matrix.os }}
27+
steps:
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@master
30+
with:
31+
php-version: ${{ matrix.php }}
32+
extensions: curl, json, mbstring, pcre
33+
ini-values: memory_limit=512M
34+
tools: composer:v2
35+
- name: Check PHP Version
36+
run: php -v
37+
- name: Checkout
38+
uses: actions/checkout@master
39+
- name: Composer install without dev
40+
run: composer install --no-progress --no-dev --prefer-dist --optimize-autoloader
41+
- name: Composer install with dev
42+
run: composer install --no-progress --prefer-dist --optimize-autoloader
43+
- name: PHPUnit (not windows)
44+
run: ./vendor/bin/phpunit tests/
45+
if: matrix.os != 'windows-latest'
46+
- name: PHPUnit (windows)
47+
run: .\vendor\bin\phpunit tests/
48+
if: matrix.os == 'windows-latest'

0 commit comments

Comments
 (0)