Skip to content

Commit 06e274d

Browse files
committed
GitHub Actions: Use new PHP workflows
1 parent 3e4e8db commit 06e274d

File tree

1 file changed

+8
-66
lines changed

1 file changed

+8
-66
lines changed

.github/workflows/php.yml

Lines changed: 8 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,17 @@
1-
name: PHP Tests
1+
name: CI
22

33
on:
44
push:
55
branches:
66
- main
77
- release/*
88
pull_request:
9+
branches:
10+
- main
911

1012
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

Comments
 (0)