-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.66 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Test PHP
on:
push:
branches:
- '**'
- '!stable'
- '!stage'
env:
php_version: 8.0
phpunit_version: 4
composer_version: 1
jobs:
release:
name: Test
if: |
!(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]')) &&
!(github.event_name == 'pull_request' && contains(join(github.event.pull_request.title, github.event.pull_request.body), '[skip ci]'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
version: ${{ env.composer_version }}
php_version: ${{ env.php_version }}
- name: Run PHPUnit
uses: php-actions/phpunit@v3
with:
version: ${{ env.phpunit_version }}
php_version: ${{ env.php_version }}
- name: Run PHPCS
run: php vendor/bin/phpcs --standard=PSR2 src/
check_php_syntax:
name: Check if PHP files are compatible
if: |
!(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]')) &&
!(github.event_name == 'pull_request' && contains(join(github.event.pull_request.title, github.event.pull_request.body), '[skip ci]'))
runs-on: ubuntu-latest
strategy:
matrix:
php_version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"]
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
version: ${{ env.composer_version }}
php_version: ${{ matrix.php_version }}
- uses: korelstar/phplint-problem-matcher@v1
- run: docker run -v "$(pwd):/app" -w /app --rm -it php:${{ matrix.php_version }} .github/php-lint