Skip to content

Add ClickHouse 25.8 and 26.3 LTS versions to CI matrix #1771

Add ClickHouse 25.8 and 26.3 LTS versions to CI matrix

Add ClickHouse 25.8 and 26.3 LTS versions to CI matrix #1771

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- "master"
workflow_dispatch:
jobs:
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.4"
- "8.5"
dependency-versions:
- "highest"
include:
- dependency-versions: "lowest"
php-version: "8.4"
env:
CLICKHOUSE_SKIP_USER_SETUP: 1
CLICKHOUSE_VERSION: "24.8"
steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: "Build the docker compose stack"
run: "docker compose -f tests/docker-compose.yaml up -d"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "variables_order=EGPCS, zend.assertions=1"
extensions: json
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH }}"}}'
with:
composer-options: "${{ matrix.composer-options }}"
dependency-versions: "${{ matrix.dependency-versions }}"
- name: "Run PHPUnit"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
- name: "Upload coverage file"
uses: actions/upload-artifact@v7
with:
name: "phpunit-${{ matrix.dependency-versions }}-${{ matrix.php-version }}.coverage"
path: "coverage.xml"
phpunit-with-clickhouse:
name: "PHPUnit"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.4"
- "8.5"
clickhouse-version:
- "24.3"
- "24.8"
- "25.3"
- "25.8"
- "26.3"
dependency-versions:
- "highest"
env:
CLICKHOUSE_SKIP_USER_SETUP: 1
CLICKHOUSE_VERSION: ${{ matrix.clickhouse-version }}
steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: "Build the docker compose stack"
run: "docker compose -f tests/docker-compose.yaml up -d"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "none"
ini-values: "variables_order=EGPCS, zend.assertions=1"
extensions: json
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH }}"}}'
with:
dependency-versions: "${{ matrix.dependency-versions }}"
- name: "Run PHPUnit"
run: |
vendor/bin/phpunit --testdox 2>&1 | tee /tmp/phpunit-output.txt
exit ${PIPESTATUS[0]}
- name: "Post PHPUnit output on failure"
if: failure()
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const output = fs.readFileSync('/tmp/phpunit-output.txt', 'utf8');
const body = `## PHPUnit failure: PHP ${{ matrix.php-version }}, ClickHouse ${{ matrix.clickhouse-version }}\n\`\`\`\n${output.slice(-3000)}\n\`\`\``;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: body
});
upload_coverage:
name: "Upload coverage to Codecov"
runs-on: "ubuntu-latest"
needs:
- "phpunit"
steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: "Download coverage files"
uses: actions/download-artifact@v8
with:
path: "reports"
- name: "Upload to Codecov"
uses: codecov/codecov-action@v6
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: reports