Skip to content

Commit c470439

Browse files
committed
adding github actions
1 parent c358b6a commit c470439

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PHP Composer
2+
3+
#whenever master has a PR or is pushed to
4+
on:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
run:
12+
runs-on: ubuntu-18.04
13+
strategy:
14+
#for each of the following versions of PHP, with and without --prefer-lowest
15+
matrix:
16+
php-versions: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
17+
18+
#set the name for each job
19+
name: PHP ${{ matrix.php-versions }}
20+
steps:
21+
#sets up the correct version of PHP with necessary config options
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php-versions }}
26+
ini-values: memory_limit=4G, phar.readonly=false
27+
28+
#checkout the codebase from github
29+
- name: Checkout codebase
30+
uses: actions/checkout@v3
31+
32+
#run composer
33+
- name: Composer install
34+
run: composer install
35+
36+
#run tests
37+
- name: Run test suite
38+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)