|
1 | | -name: PHP Tests |
| 1 | +name: CI |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - main |
7 | 7 | - release/* |
8 | 8 | pull_request: |
| 9 | + branches: |
| 10 | + - main |
9 | 11 |
|
10 | 12 | jobs: |
11 | | - lint: |
12 | | - name: Static analysis for PHP ${{ matrix.php }} on ${{ matrix.os }} |
13 | | - runs-on: ${{ matrix.os }} |
14 | | - |
15 | | - strategy: |
16 | | - fail-fast: false |
17 | | - matrix: |
18 | | - php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] |
19 | | - os: [ 'ubuntu-latest' ] |
20 | | - |
21 | | - steps: |
22 | | - - name: Checkout code base |
23 | | - uses: actions/checkout@v3 |
24 | | - |
25 | | - - name: Setup PHP |
26 | | - uses: shivammathur/setup-php@v2 |
27 | | - with: |
28 | | - php-version: ${{ matrix.php }} |
29 | | - tools: phpcs |
30 | | - extensions: ev |
31 | | - |
32 | | - - name: Setup dependencies |
33 | | - run: composer require -n --no-progress overtrue/phplint |
34 | | - |
35 | | - - name: PHP Lint |
36 | | - if: ${{ ! cancelled() }} |
37 | | - run: ./vendor/bin/phplint -n --exclude={^vendor/.*} -- . |
38 | | - |
39 | | - - name: PHP CodeSniffer |
40 | | - if: ${{ ! cancelled() }} |
41 | | - run: phpcs -wps --colors |
42 | | - |
43 | | - - name: PHPStan |
44 | | - if: ${{ ! cancelled() }} |
45 | | - uses: php-actions/phpstan@v3 |
46 | | - |
47 | | - test: |
48 | | - name: Unit tests with PHP ${{ matrix.php }} on ${{ matrix.os }} |
49 | | - runs-on: ${{ matrix.os }} |
50 | | - |
51 | | - env: |
52 | | - PHPUNIT_VERSION: 8.5 |
53 | | - |
54 | | - strategy: |
55 | | - fail-fast: false |
56 | | - matrix: |
57 | | - php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] |
58 | | - os: [ 'ubuntu-latest' ] |
59 | | - |
60 | | - steps: |
61 | | - - name: Checkout code base |
62 | | - uses: actions/checkout@v3 |
63 | | - |
64 | | - - name: Setup PHP |
65 | | - uses: shivammathur/setup-php@v2 |
66 | | - with: |
67 | | - php-version: ${{ matrix.php }} |
68 | | - tools: phpunit:${{ env.PHPUNIT_VERSION }} |
69 | | - extensions: ev |
70 | | - |
71 | | - - name: Setup dependencies |
72 | | - run: composer install -n --no-progress |
73 | | - |
74 | | - - name: PHPUnit |
75 | | - run: phpunit --verbose |
| 13 | + php: |
| 14 | + name: php |
| 15 | + uses: Icinga/github-actions/.github/workflows/php.yml@php-workflows |
| 16 | + with: |
| 17 | + databases: false |
0 commit comments