Skip to content

Commit b79c021

Browse files
committed
introduce github actions
1 parent 24f3034 commit b79c021

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- '3.next-cake5'
8+
pull_request:
9+
branches:
10+
- '*'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read # to fetch code (actions/checkout)
15+
16+
jobs:
17+
testsuite-linux:
18+
runs-on: ubuntu-22.04
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
php-version: ['8.1', '8.2']
23+
dependencies: ['highest']
24+
include:
25+
- php-version: '8.1'
26+
dependencies: 'lowest'
27+
- php-version: '8.2'
28+
dependencies: 'highest'
29+
30+
steps:
31+
- uses: actions/checkout@v3
32+
33+
- name: Setup PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: ${{ matrix.php-version }}
37+
extensions: mbstring, intl
38+
ini-values: zend.assertions=1
39+
tools: cs2pr
40+
41+
- name: Composer install
42+
uses: ramsey/composer-install@v2
43+
with:
44+
dependency-versions: ${{ matrix.dependencies }}
45+
composer-options: ${{ matrix.composer-options }}
46+
47+
- name: Run PHPUnit
48+
run: vendor/bin/phpunit
49+
50+
cs-stan:
51+
name: Coding Standard & Static Analysis
52+
runs-on: ubuntu-22.04
53+
54+
steps:
55+
- uses: actions/checkout@v3
56+
57+
- name: Setup PHP
58+
uses: shivammathur/setup-php@v2
59+
with:
60+
php-version: '8.2'
61+
extensions: mbstring, intl
62+
coverage: none
63+
tools: phive, cs2pr
64+
65+
- name: Composer Install
66+
uses: ramsey/composer-install@v2
67+
68+
- name: Run phpcs
69+
run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr
70+
71+
- name: Run phpstan
72+
if: always()
73+
run: vendor/bin/phpstan analyse --error-format=github

0 commit comments

Comments
 (0)