Skip to content

Commit d0d4cb0

Browse files
author
nix
committed
added GitHub action QA (unit tests and static analysis)
1 parent c10b467 commit d0d4cb0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Quality Assurance
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
unit-tests:
12+
name: PHPUnit tests (with coverage, on PHP ${{ matrix.php }})
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php: [ '8.2', '8.3', '8.4', '8.5' ]
17+
steps:
18+
- name: 'Checkout'
19+
uses: actions/checkout@v4
20+
- name: 'Set up PHP (${{ matrix.php }})'
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
coverage: xdebug
25+
- run: ./composer.phar install -n --no-progress -o
26+
- run: ./composer.phar test+coverage
27+
static-analysis:
28+
name: PHPStan checks (on PHP ${{ matrix.php }})
29+
runs-on: ubuntu-latest
30+
strategy:
31+
matrix:
32+
php: [ '8.2', '8.3', '8.4', '8.5' ]
33+
steps:
34+
- name: 'Checkout'
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
- name: 'Set up PHP (${{ matrix.php }})'
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: ${{ matrix.php }}
42+
- run: ./composer.phar install -n --no-progress -o
43+
- run: ./composer.phar stan
44+
- run: ./composer.phar stan-tests

0 commit comments

Comments
 (0)