Skip to content

Commit 539c578

Browse files
committed
feat: #2 github actions
1 parent 2c91c13 commit 539c578

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php: [7.4, 8.0]
17+
steps:
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php }}
22+
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
26+
- name: Prepare
27+
run: composer install
28+
29+
- name: Lint
30+
run: ./vendor/bin/phpcs --extensions=php --standard=PSR12 src/ tests/
31+
32+
- name: PHPMD
33+
run: ./vendor/bin/phpmd . text phpmd.xml --exclude vendor
34+
35+
- name: Test
36+
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover coverage.xml --coverage-filter src/ tests/
37+
38+
- name: codecov
39+
uses: codecov/codecov-action@v2

0 commit comments

Comments
 (0)