Skip to content

Commit 7d62ad6

Browse files
authored
Merge pull request #57 from odan/github-actions
Add GitHub action test workflow
2 parents 7932a96 + 0688fe9 commit 7d62ad6

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
name: Tests PHP ${{ matrix.php }}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php: [7.4, 8.0, 8.1, 8.2, 8.3]
13+
include:
14+
- php: 8.2
15+
analysis: true
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Set up PHP ${{ matrix.php }}
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
coverage: xdebug
26+
27+
- name: Install dependencies
28+
run: composer install --prefer-dist --no-progress
29+
30+
- name: Coding standards
31+
if: matrix.analysis
32+
run: vendor/bin/phpcs
33+
34+
- name: Tests
35+
run: vendor/bin/phpunit --coverage-clover clover.xml
36+

0 commit comments

Comments
 (0)