@@ -261,4 +261,106 @@ jobs:
261261 uses : codecov/codecov-action@v4
262262 with :
263263 token : ${{ secrets.CODECOV_TOKEN }}
264- directory : ./var/phpunit/coverage/clover
264+ directory : ./var/phpunit/coverage/clover
265+
266+ - name : Get the branch name and SHA
267+ if : ${{ github.event_name == 'push' }} && ${{ matrix.php-version == '8.2' }} && ${{ matrix.dependencies == 'locked' }}
268+ run : |
269+ branch_name=${GITHUB_REF#refs/heads/}
270+ commit_sha=$(git rev-parse HEAD)
271+ echo "codecov_branch_name=$branch_name" >> $GITHUB_ENV
272+ echo "codecov_commit_sha=$commit_sha" >> $GITHUB_ENV
273+
274+ - name : Save commit SHA to file
275+ if : ${{ github.event_name == 'push' }} && ${{ matrix.php-version == '8.2' }} && ${{ matrix.dependencies == 'locked' }}
276+ run : echo -n "${{ env.codecov_commit_sha }}" > codecov-base-commit-sha-${{ env.codecov_branch_name }}.txt
277+
278+ - name : Upload commit SHA as artifact
279+ if : ${{ github.event_name == 'push' }} && ${{ matrix.php-version == '8.2' }} && ${{ matrix.dependencies == 'locked' }}
280+ uses : actions/upload-artifact@v4
281+ with :
282+ name : codecov-base-commit-sha-${{ env.codecov_branch_name }}
283+ path : codecov-base-commit-sha-${{ env.codecov_branch_name }}.txt
284+
285+ - name : " Put SHA to step summary"
286+ if : ${{ github.event_name == 'push' }} && ${{ matrix.php-version == '8.2' }} && ${{ matrix.dependencies == 'locked' }}
287+ run : |
288+ echo "Baseline commit SHA for Codecov: ${{ env.codecov_commit_sha }}" >> $GITHUB_STEP_SUMMARY
289+
290+ extension-tests :
291+ name : " Extension Tests"
292+
293+ runs-on : ${{ matrix.operating-system }}
294+
295+ strategy :
296+ fail-fast : false
297+ matrix :
298+ dependencies :
299+ - " locked"
300+ php-version :
301+ - " 8.2"
302+ - " 8.3"
303+ - " 8.4"
304+ operating-system :
305+ - " ubuntu-latest"
306+
307+ steps :
308+ - name : " Checkout"
309+ uses : " actions/checkout@v4"
310+
311+ - name : " Install dependencies"
312+ run : |
313+ sudo apt-get update && sudo apt-get install libbrotli1 liblz4-1 libzstd1 --assume-yes
314+
315+ - name : " Install PHP"
316+ uses : " shivammathur/setup-php@v2"
317+ with :
318+ tools : composer:v2
319+ php-version : " ${{ matrix.php-version }}"
320+ ini-values : memory_limit=-1
321+ extensions :
:psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, brotli, lz4, zstd, snappy-https://github.com/kjdev/[email protected] 322+ env :
323+ SNAPPY_CONFIGURE_PREFIX_OPTS : " CXXFLAGS=-std=c++11"
324+
325+ - name : " List PHP Extensions"
326+ run : php -m
327+
328+ - name : " List PHP configuration"
329+ run : php -i
330+
331+ - name : " Get Composer Cache Directory"
332+ id : composer-cache
333+ run : |
334+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
335+
336+ - name : " Cache Composer dependencies"
337+ uses : " actions/cache@v4"
338+ with :
339+ path : " ${{ steps.composer-cache.outputs.dir }}"
340+ key : " php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.lock') }}"
341+ restore-keys : |
342+ php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
343+
344+ - name : " Install lowest dependencies"
345+ if : ${{ matrix.dependencies == 'lowest' }}
346+ run : " composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
347+
348+ - name : " Install highest dependencies"
349+ if : ${{ matrix.dependencies == 'highest' }}
350+ run : " composer update --no-interaction --no-progress --no-suggest"
351+
352+ - name : " Install locked dependencies"
353+ if : ${{ matrix.dependencies == 'locked' }}
354+ run : " composer install --no-interaction --no-progress --no-suggest"
355+
356+ - name : " Test Brotli"
357+ run : " composer test:lib:parquet -- --group brotli-extension"
358+
359+ - name : " Test LZ4"
360+ run : " composer test:lib:parquet -- --group lz4-extension"
361+
362+ - name : " Test ZSTD"
363+ run : " composer test:lib:parquet -- --group zstd-extension"
364+
365+ - name : " Test Snappy"
366+ run : " composer test:lib:parquet -- --group snappy-extension"
0 commit comments