Skip to content

Add composer.json for compatibility with PIE #466

Add composer.json for compatibility with PIE

Add composer.json for compatibility with PIE #466

Workflow file for this run

name: Build and test on Linux
on:
push:
branches: [ main ]
pull_request:
release:
types: [ created ]
jobs:
tests:
runs-on: ubuntu-latest
name: Build and test
strategy:
fail-fast: false
matrix:
php: [ "8.0", "8.1", "8.2", "8.3", "8.4" ]
use-opcache: [ "true", "false" ]
steps:
- name: Checkout jsonpath
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
tools: pecl
- name: Compile jsonpath
run: ./.build-scripts/compile.sh
- name: Find PHP
run: |
TEST_PHP_EXECUTABLE=`make findphp`
echo "Found PHP in: $TEST_PHP_EXECUTABLE"
echo "TEST_PHP_EXECUTABLE=$TEST_PHP_EXECUTABLE" >> $GITHUB_ENV
- name: Define PHP arguments
run: |
TEST_PHP_ARGS="-n"
[[ "${{ matrix.use-opcache }}" != "true" ]] || TEST_PHP_ARGS="$TEST_PHP_ARGS -d zend_extension=opcache.so -d opcache.enable=1 -d opcache.enable_cli=1"
TEST_PHP_ARGS="$TEST_PHP_ARGS -d extension=$PWD/modules/jsonpath.so"
echo "Test PHP arguments: $TEST_PHP_ARGS"
echo "TEST_PHP_ARGS=$TEST_PHP_ARGS" >> $GITHUB_ENV
- name: Run jsonpath tests
run: |
$TEST_PHP_EXECUTABLE $TEST_PHP_ARGS -v
$TEST_PHP_EXECUTABLE -n run-tests.php -q -x --show-diff
- name: Show errors
if: ${{ failure() }}
run: ./.build-scripts/show-errors.sh