-
Notifications
You must be signed in to change notification settings - Fork 20
109 lines (103 loc) · 3.11 KB
/
continuous-integration.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
105
106
107
108
109
name: "Continuous Integration"
on:
pull_request:
push:
jobs:
unit-tests:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system:
- ubuntu-latest
- windows-latest
php-versions:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl, sodium, zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
# temporarily remove Psalm until ready for PHP 8.4
- name: remove psalm
if: matrix.php-versions == '8.4'
run: composer remove --dev --no-install vimeo/psalm psalm/plugin-phpunit php-standard-library/psalm-plugin
- uses: ramsey/composer-install@v3
- name: Run PHPUnit on Windows
if: matrix.operating-system == 'windows-latest'
run: vendor/bin/phpunit
- name: Run PHPUnit on non-Windows
if: matrix.operating-system != 'windows-latest'
run: sudo vendor/bin/phpunit
behaviour-tests:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system:
- ubuntu-latest
- windows-latest
php-versions:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl, sodium, zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
# temporarily remove Psalm until ready for PHP 8.4
- name: remove psalm
if: matrix.php-versions == '8.4'
run: composer remove --dev --no-install vimeo/psalm psalm/plugin-phpunit php-standard-library/psalm-plugin
- uses: ramsey/composer-install@v3
- name: Run Behat on Windows
if: matrix.operating-system == 'windows-latest'
run: vendor/bin/behat --tags="~@non-windows"
- name: Run Behat on non-Windows
if: matrix.operating-system != 'windows-latest'
run: vendor/bin/behat
coding-standards:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: intl, sodium, zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: ramsey/composer-install@v3
- name: Run PHPCS
run: vendor/bin/phpcs
static-analysis:
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: intl, sodium, zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: ramsey/composer-install@v3
- name: Run Psalm
run: vendor/bin/psalm
build-phar:
needs:
- unit-tests
- coding-standards
- static-analysis
uses: ./.github/workflows/release-unsigned-phar.yml