Skip to content

Commit 47990cd

Browse files
committed
Moved uploading baseline codecov commit sha to test suite workflow and merged test suite with extensions tests
1 parent 80ba817 commit 47990cd

File tree

5 files changed

+106
-131
lines changed

5 files changed

+106
-131
lines changed

.github/workflows/baseline.yml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -245,31 +245,4 @@ jobs:
245245
with:
246246
source-directory: 'web/landing/build'
247247
destination-github-username: 'flow-php'
248-
destination-repository-name: 'flow-php.com'
249-
250-
set-baseline-commit-sha:
251-
runs-on: ubuntu-latest
252-
253-
steps:
254-
- name: Checkout repository
255-
uses: actions/checkout@v3
256-
257-
- name: Get the branch name and SHA
258-
run: |
259-
branch_name=${GITHUB_REF#refs/heads/}
260-
commit_sha=$(git rev-parse HEAD)
261-
echo "branch_name=$branch_name" >> $GITHUB_ENV
262-
echo "commit_sha=$commit_sha" >> $GITHUB_ENV
263-
264-
- name: Save commit SHA to file
265-
run: echo -n "${{ env.commit_sha }}" > base-commit-sha-${{ env.branch_name }}.txt
266-
267-
- name: Upload commit SHA as artifact
268-
uses: actions/upload-artifact@v4
269-
with:
270-
name: base-commit-sha-${{ env.branch_name }}
271-
path: base-commit-sha-${{ env.branch_name }}.txt
272-
273-
- name: "Put SHA to step summary"
274-
run: |
275-
echo "Baseline commit SHA: ${{ env.commit_sha }}" >> $GITHUB_STEP_SUMMARY
248+
destination-repository-name: 'flow-php.com'

.github/workflows/pr-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Pull Request Comment
22

33
on:
44
workflow_run:
5-
workflows: ["Benchmark Suite"]
5+
workflows: ["Test Benchmarks"]
66
types:
77
- completed
88

.github/workflows/test-benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Benchmark Suite
1+
name: Test Benchmarks
22

33
on:
44
pull_request:

.github/workflows/test-extensions.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

.github/workflows/test-suite.yml

Lines changed: 103 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)