forked from mlocati/docker-php-extension-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
207 lines (205 loc) · 6.34 KB
/
test-extensions.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
name: Test extensions
on:
- pull_request
jobs:
check_syntax_data:
name: Check data syntax
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check order supported extensions list
run: |
sort -o data/supported-extensions.sorted data/supported-extensions
if ! DIFF="$(diff -u data/supported-extensions data/supported-extensions.sorted)"; then
printf 'The order of extensions in data/supported-extensions is wrong.\nThe list of required changes is:\n\n%s\n' "$DIFF" >&2
exit 1
fi
rm data/supported-extensions.sorted
sort -o data/special-requirements.sorted data/special-requirements
if ! DIFF="$(diff -u data/special-requirements data/special-requirements.sorted)"; then
printf 'The order of extensions in data/special-requirements is wrong.\nThe list of required changes is:\n\n%s\n' "$DIFF" >&2
exit 1
fi
rm data/special-requirements.sorted
check_syntax_shell:
name: Check shell coding style
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.21.0"
- name: Install shfmt
run: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/[email protected]
- name: Checkout
uses: actions/checkout@v2
- name: Check coding style
run: ./scripts/invoke-shfmt check
check_syntax_php:
name: Check PHP coding style
runs-on: ubuntu-latest
steps:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
tools: composer
- name: Checkout
uses: actions/checkout@v2
- name: Install Composer dependencies
run: composer install --no-progress --classmap-authoritative
- name: Check coding style
run: composer run-script lint -- --dry-run --diff
test_extensions:
needs:
- check_syntax_data
- check_syntax_shell
- check_syntax_php
strategy:
fail-fast: true
matrix:
distro:
- alpine3.9
- alpine3.10
- alpine3.11
- alpine3.12
- alpine3.13
- alpine3.14
- alpine3.15
- alpine3.16
- alpine3.17
- alpine3.18
- alpine3.19
- jessie
- stretch
- buster
- bullseye
- bookworm
name: Check on ${{ matrix.distro }}
runs-on: ubuntu-latest
env:
IPETEST_DOCKER_DISTRO: ${{ matrix.distro }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test extensions
run: ./scripts/ci-test-extensions from-commits "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}"
test_restoring_packages:
name: Test restoring packages
needs:
- check_syntax_data
- check_syntax_shell
- check_syntax_php
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- run: docker run --rm --volume "$(pwd):/app" --workdir /app php:8.2-bullseye ./scripts/test-restore-apt
test_custom_version:
name: Test installing specific versions
needs:
- check_syntax_data
- check_syntax_shell
- check_syntax_php
runs-on: ubuntu-latest
strategy:
matrix:
xdebug_version:
- ''
- 2.9.8
- 3.0.0
- ^2
- ^2.8
- ^2.8@stable
steps:
- name: Checkout
uses: actions/checkout@v2
- run: docker run --rm --volume "$(pwd):/app" --workdir /app php:7.4-alpine ./scripts/test-installversion "${{ matrix.xdebug_version }}"
test_composer:
name: Test installing composer
needs:
- check_syntax_data
- check_syntax_shell
- check_syntax_php
runs-on: ubuntu-latest
strategy:
matrix:
composer_version:
- ''
- '1'
- '2.0.1'
steps:
- name: Checkout
uses: actions/checkout@v2
- run: |
docker run --rm --volume "$(pwd):/app" --workdir /app php:7.4-alpine ./scripts/test-installcomposer "${{ matrix.composer_version }}"
test_marking_packages:
name: Test marking pre-installed packages
needs:
- check_syntax_data
- check_syntax_shell
- check_syntax_php
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- alpine
- buster
steps:
- name: Checkout
uses: actions/checkout@v2
- run: docker run --rm --volume "$(pwd):/app" --workdir /app "php:7.4-${{ matrix.distro }}" "./scripts/ci-markused-${{ matrix.distro }}"
test_instantclient_basic:
name: Test using Oracle Instant Client Basic
needs:
- check_syntax_data
- check_syntax_shell
- check_syntax_php
runs-on: ubuntu-latest
container: php:8.1-cli-alpine
steps:
- name: Checkout
uses: actions/checkout@v3
- run: IPE_INSTANTCLIENT_BASIC=1 ./install-php-extensions oci8 pdo_oci
test_install_fromsource:
name: Test installing from source
needs:
- check_syntax_data
- check_syntax_shell
- check_syntax_php
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
container:
- php:8.1-cli-alpine
source:
- php-memcached-dev/php-memcached@8f106564e6bb005ca6100b12ccc89000daafa9d8
- php-memcached-dev/php-memcached@8f106564e6bb
- php-memcached-dev/[email protected]
- php-memcached-dev/php-memcached@refs/tags/v3.2.0RC2
include:
-
container: php:8.1-cli-bullseye
source: php-memcached-dev/[email protected]
-
container: php:7.4-cli-alpine
source: php-memcached-dev/[email protected]
steps:
- name: Checkout
uses: actions/checkout@v3
- run: ./install-php-extensions ${{ matrix.source }}
test_upgrading_icu_data_en:
name: Test that icu-data-en can be upgraded
needs:
- check_syntax_data
- check_syntax_shell
- check_syntax_php
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: docker run --rm --volume "$(pwd):/app" --workdir /app php:8.2-cli-alpine ./scripts/test-icu-data-en-upgradable