Packaging: 2.8.0 #80
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | |
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 |