Skip to content

Commit 1a81863

Browse files
committed
setup github action
1 parent 5bc0f8a commit 1a81863

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ci_build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "ci build"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
9+
jobs:
10+
build:
11+
name: PHP ${{ matrix.php-versions }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-versions: ['8.0']
17+
steps:
18+
- name: Setup PHP Action
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
extensions: intl
22+
php-version: "${{ matrix.php-versions }}"
23+
coverage: xdebug
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
- run: "composer validate"
27+
- name: "Install dependencies"
28+
run: "composer install --prefer-dist"
29+
- name: "CS Check"
30+
run: "composer cs-check"
31+
- name: "Code analyze"
32+
run: |
33+
bin/phpstan analyse src/ --level=max -c phpstan.neon
34+
bin/rector process --dry-run
35+
- name: "Run test suite"
36+
run: "mkdir -p build/logs && bin/kahlan --coverage=4 --reporter=verbose --clover=build/logs/clover.xml"
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v1
39+
with:
40+
token: ${{ secrets.CODECOV_TOKEN }}
41+
file: ./build/logs/clover.xml
42+
flags: tests
43+
name: codecov-umbrella
44+
yml: ./codecov.yml
45+
fail_ci_if_error: true

0 commit comments

Comments
 (0)