Skip to content

Commit e61f871

Browse files
authored
Setup GitHub Actions
1 parent 20dc402 commit e61f871

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: ["8.0", "7.4", "7.3", "7.2"]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Cache dependencies
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.composer/cache/files
26+
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
27+
restore-keys: |
28+
dependencies-php-${{ matrix.php }}-composer-
29+
dependencies-php-
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
extensions: json, dom, curl, libxml, mbstring
36+
coverage: none
37+
38+
- name: Install dependencies
39+
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
40+
41+
- name: Execute tests
42+
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)