-
Notifications
You must be signed in to change notification settings - Fork 30
67 lines (63 loc) · 1.91 KB
/
testing-and-cs.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
58
59
60
61
62
63
64
65
66
name: Testing and Code Quality
on: [push, pull_request]
jobs:
PHPCS:
name: Code Sniffing
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: 'Composer install'
uses: docker://composer:2.2
with:
args: install
- name: 'Code sniffing'
uses: docker://php:8.1-cli
with:
args: "vendor/bin/php-cs-fixer fix src --dry-run"
PHPUnit-Symfony45:
name: PHPUnit testing
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["7.2", "7.3", "7.4", "8.0", "8.1"]
composer: ["1.10", "2.0", "2.1", "2.2"]
symfony: ["^4.0", "^5.0"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: 'Unit testing'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:${{ matrix.composer }}
- run: composer require "symfony/finder:${{ matrix.symfony }}" "symfony/filesystem:${{ matrix.symfony }}"
- run: composer install
- run: vendor/bin/phpunit
PHPUnit-Symfony56:
name: PHPUnit testing
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1"]
composer: ["2.0", "2.1", "2.2", "2.3"]
symfony: ["^5.4", "^6.0"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: 'Unit testing'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:${{ matrix.composer }}
- run: composer require "symfony/finder:${{ matrix.symfony }}" "symfony/filesystem:${{ matrix.symfony }}"
- run: composer install
- run: vendor/bin/phpunit
BuildDone:
name: PHP full build
needs: [PHPCS, PHPUnit-Symfony45, PHPUnit-Symfony56]
runs-on: ubuntu-latest
steps:
- run: "echo build done"