Skip to content

Commit 297048f

Browse files
authored
Merge pull request #2 from MekDrop/ci-tests
Added github-ci tests workflow
2 parents 521b4d6 + def4171 commit 297048f

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
- 5.4
19+
- 5.5
20+
- 5.6
21+
- 7.0
22+
- 7.1
23+
- 7.2
24+
- 7.3
25+
- 7.4
26+
# - 8.0
27+
# - 8.1
28+
os:
29+
- ubuntu-latest
30+
- windows-latest
31+
- macOS-latest
32+
name: PHP ${{ matrix.php }}; ${{ matrix.os }}
33+
steps:
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@master
36+
with:
37+
php-version: ${{ matrix.php }}
38+
extensions: curl, json, mbstring, pcre
39+
ini-values: memory_limit=512M
40+
tools: composer:v2
41+
- name: Check PHP Version
42+
run: php -v
43+
- name: Checkout
44+
uses: actions/checkout@master
45+
- name: Composer install without dev
46+
run: composer install --no-progress --no-dev --prefer-dist --optimize-autoloader
47+
- name: Composer install with dev
48+
run: composer install --no-progress --prefer-dist --optimize-autoloader
49+
- name: PHPUnit (not windows)
50+
run: ./vendor/bin/phpunit tests/
51+
if: matrix.os != 'windows-latest'
52+
- name: PHPUnit (windows)
53+
run: .\vendor\bin\phpunit tests/
54+
if: matrix.os == 'windows-latest'

0 commit comments

Comments
 (0)