-
Notifications
You must be signed in to change notification settings - Fork 39
50 lines (48 loc) · 1.4 KB
/
linux-tests.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
name: Linux (tests)
on:
pull_request:
branches:
- "master"
push:
tags:
- "*"
branches:
- "master"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
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
env:
SOLR_SERVER_CONFIGURED: 1
run: TEST_PHP_ARGS="$TEST_PHP_ARGS -q" make test
services:
solr:
image: omars44/pecl-solr-test:latest
ports:
- 8983:8983