-
Notifications
You must be signed in to change notification settings - Fork 3
104 lines (85 loc) · 3.11 KB
/
ci.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Test suite
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
jobs:
static-analyse:
name: Code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- uses: actions/cache@v2
id: cache-composer
with:
path: ~/.composer/cache
key: composer-php-8.2-${{ github.sha }}
restore-keys: composer-php-8.2-
- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-suggest
- name: Run PHP CS Fixer
run: make test.phpcs
unit-test:
name: Unit tests
strategy:
matrix:
php: [ 8.1, 8.2, 8.3 ]
os: [ ubuntu-latest ]
include:
- os: [ ubuntu-latest ]
php: 8.0
composer-flag: "'--prefer-lowest'"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- uses: actions/cache@v2
id: cache-composer
with:
path: ~/.composer/cache
key: composer-php-${{ matrix.php }}-${{ github.sha }}
restore-keys: composer-php-${{ matrix.php }}-
- name: Valid composer.json
run: make test.composer
- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-suggest --no-plugins ${{ matrix.composer-flag }}
- name: Run PHPUnit tests
run: make test.phpunit
functional-test:
name: Functionnal tests
strategy:
matrix:
php: [ 8.1, 8.2 ]
os: [ ubuntu-latest ]
include:
- os: [ ubuntu-latest ]
php: 8.0
composer-flag: "'--prefer-lowest'"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: sqlite3
- uses: actions/cache@v2
id: cache-composer
with:
path: ~/.composer/cache
key: composer-php-${{ matrix.php }}-${{ github.sha }}
restore-keys: composer-php-${{ matrix.php }}-
- name: Install dependencies
run: composer update --prefer-dist --no-progress --no-suggest --no-plugins ${{ matrix.composer-flag }}
- name: Run Behat tests
run: make test.behat