-
Notifications
You must be signed in to change notification settings - Fork 39
39 lines (38 loc) · 1.25 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
name: CI
#on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Install PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, json
# For PHP 7.x we need to specify a full path to json.so, for PHP 8.x the JSON module is compiled into the core binary
- name: Set TEST_PHP_ARGS
if: ${{ startsWith(matrix.php, '7.') }}
run: echo "TEST_PHP_ARGS=-d extension=$(php -i | grep extension_dir | cut -d " " -f 5 | head -n 1)/json.so" >> $GITHUB_ENV
- name: Build PHP extension
run: |
phpize
./configure
make
# Run tests (we add the -q flag to skip the "send report?" question at the end)
- name: Run tests
run: TEST_PHP_ARGS="$TEST_PHP_ARGS -q" make test
services:
solr:
image: omars44/pecl-solr-test:latest
ports:
- 8983:8983