Skip to content

Commit fa3a30a

Browse files
committed
up: add github actions scripts
1 parent d16460e commit fa3a30a

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/php.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Unit-tests
2+
3+
on: [push]
4+
5+
# usage refer https://github.com/shivammathur/setup-php
6+
jobs:
7+
test:
8+
name: Test on php ${{ matrix.php}} and ${{ matrix.os }}
9+
runs-on: ${{ matrix.os }}
10+
timeout-minutes: 10
11+
strategy:
12+
fail-fast: false # dont fast fail
13+
matrix:
14+
php: [7.1, 7.2, 7.3, 7.4]
15+
os: [ubuntu-latest, windows-latest, macOS-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Setup PHP
20+
timeout-minutes: 5
21+
uses: shivammathur/setup-php@v1
22+
with:
23+
php-version: ${{ matrix.php}}
24+
extension-csv: mbstring #optional, setup extensions
25+
ini-values-csv: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
26+
coverage: none #optional, setup coverage driver: xdebug, none
27+
pecl: true
28+
29+
- name: Install extensions
30+
run: |
31+
php -m
32+
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m
33+
34+
- name: Install dependencies
35+
run: composer install --no-progress --no-suggest
36+
37+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
38+
# Docs: https://getcomposer.org/doc/articles/scripts.md
39+
40+
- name: Run test suite
41+
run: composer run test

0 commit comments

Comments
 (0)