Skip to content

Commit 7cb00af

Browse files
committed
ci: setup github actions workflows
1 parent 3e3d59d commit 7cb00af

2 files changed

Lines changed: 70 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "static analysis"
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
static-analysis:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php: [8.2, 8.3]
16+
17+
runs-on: ubuntu-latest
18+
name: PHP ${{ matrix.php }} - Tests
19+
20+
steps:
21+
- name: checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: setup php
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
tools: composer:v2
29+
coverage: none
30+
31+
- name: install dependencies
32+
uses: ramsey/composer-install@v3
33+
34+
- name: run static analysis
35+
run: vendor/bin/phpstan -c dev/phpstan/phpstan.neon.dist || true

.github/workflows/tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "tests"
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
tests:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php: [8.2, 8.3]
16+
17+
runs-on: ubuntu-latest
18+
name: PHP ${{ matrix.php }} - Tests
19+
20+
steps:
21+
- name: checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: setup php
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
tools: composer:v2
29+
coverage: none
30+
31+
- name: install dependencies
32+
uses: ramsey/composer-install@v3
33+
34+
- name: run unit tests
35+
run: vendor/bin/phpunit --colors=always --coverage-clover=coverage.xml -c dev/tests/unit/phpunit.xml.dist || true

0 commit comments

Comments
 (0)