Skip to content

Commit b4b7949

Browse files
committed
✨ add GH actions
1 parent d75119e commit b4b7949

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
# https://github.com/sebastianbergmann/phpunit/blob/master/.github/workflows/ci.yml
3+
4+
on:
5+
push:
6+
branches:
7+
- v1.2.x
8+
pull_request:
9+
branches:
10+
- v1.2.x
11+
12+
13+
name: "CI"
14+
15+
jobs:
16+
17+
tests:
18+
name: "Unit Tests"
19+
needs: static-code-analysis
20+
runs-on: ${{ matrix.os }}
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os:
26+
- ubuntu-latest
27+
- windows-latest
28+
php-version:
29+
- "7.2"
30+
- "7.3"
31+
- "7.4"
32+
- "8.0"
33+
- "8.1"
34+
- "8.2"
35+
- "8.3"
36+
37+
steps:
38+
- name: "Checkout"
39+
uses: actions/checkout@v3
40+
41+
- name: "Install PHP with extensions"
42+
uses: shivammathur/setup-php@v2
43+
with:
44+
php-version: ${{ matrix.php-version }}
45+
coverage: pcov
46+
extensions: json
47+
48+
- name: "Install dependencies with composer"
49+
uses: ramsey/composer-install@v2
50+
51+
- name: "Run tests with phpunit"
52+
run: php vendor/phpunit/phpunit/phpunit --configuration=phpunit.xml

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"ext-json": "*"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "^8.4"
27+
"phpunit/phpunit": "^8.5"
2828
},
2929
"autoload": {
3030
"psr-4": {

0 commit comments

Comments
 (0)