Skip to content

Ci/workflow#3

Merged
lupodevelop merged 8 commits intomainfrom
ci/workflow
Nov 9, 2025
Merged

Ci/workflow#3
lupodevelop merged 8 commits intomainfrom
ci/workflow

Conversation

@lupodevelop
Copy link
Owner

This pull request introduces comprehensive improvements to documentation and continuous integration (CI) workflows for the project. It adds detailed guidance for running and organizing tests, introduces robust CI pipelines for unit, smoke, and integration tests (including multi-version ClickHouse testing), and enhances the project README with a quick start guide and clearer module descriptions.

CI/CD Enhancements:

  • Introduced a ci.yml workflow to automatically run unit tests on pushes and pull requests to main, including dependency caching and formatting checks.
  • Added an integration.yml workflow to run integration tests against multiple ClickHouse versions on pushes to main and manual dispatch, with Docker-based environment setup and artifact upload on failure.
  • Added a smoke-integration.yml workflow to run fast smoke tests against ClickHouse on every pull request, verifying basic connectivity and minimal database operations.

Documentation Improvements:

  • Expanded the README.md with a quick start example, an overview of key modules, and clearer guidance for new users.
  • Added test/TESTS.md to explain the test directory structure, how to run different types of tests, and best practices for contributors.
  • Added test/integration/README.md with detailed instructions for running integration tests locally and in CI, including Docker setup, environment variables, and CI recommendations.

Added TESTS.md to describe test directory structure, local and CI test execution, and best practices. Added integration/README.md with detailed instructions for running integration tests, environment setup, and CI recommendations.
Introduces GitHub Actions workflows for continuous integration, integration testing across multiple ClickHouse versions, and smoke integration tests on pull requests. These workflows automate building, formatting, unit testing, and basic integration checks to ensure code quality and compatibility.
Added CI and integration test badges, a Gleam version badge, and a new Quick Start section with example usage. Expanded documentation to clarify available modules and design inspiration.
Copilot AI review requested due to automatic review settings November 9, 2025 16:32
Ops! Wrong folder! Renamed and relocated CI, integration, and smoke-integration workflow YAML files from the 'workflows' directory to the standard '.github/workflows' directory for better GitHub Actions integration.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive CI/CD workflows and testing infrastructure for the Sparkling ClickHouse library. It introduces automated testing workflows for unit tests, smoke tests, and integration tests across multiple ClickHouse versions.

  • Adds three GitHub Actions workflows: unit tests, smoke integration tests for PRs, and full integration tests for main branch
  • Documents test organization and integration test setup procedures
  • Updates README with CI badges and quick start information

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
workflows/smoke-integration.yml Smoke integration test workflow that runs on PRs, testing basic ClickHouse connectivity
workflows/integration.yml Full integration test workflow with matrix testing across ClickHouse versions 22.8-24.4 and latest
workflows/ci.yml Standard CI workflow for unit tests, formatting checks, and builds on pushes and PRs
test/integration/README.md Comprehensive guide for running integration tests locally and configuring CI
test/TESTS.md Overview of test organization and execution instructions
README.md Adds CI badges, quick start guide, and project structure documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


```bash
# from the repository root, if you have a docker-compose.yml configured
docker-compose up -d
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command 'docker-compose' is deprecated. Use 'docker compose' (without hyphen) instead, which is the modern Docker CLI plugin syntax. This matches what's used in the actual workflow files.

Copilot uses AI. Check for mistakes.
2. Wait for the server to be ready:

```bash
docker-compose ps
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command 'docker-compose' is deprecated. Use 'docker compose' (without hyphen) instead, which is the modern Docker CLI plugin syntax.

Copilot uses AI. Check for mistakes.
4. Tear down the environment when finished:

```bash
docker-compose down -v
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command 'docker-compose' is deprecated. Use 'docker compose' (without hyphen) instead, which is the modern Docker CLI plugin syntax.

Copilot uses AI. Check for mistakes.
```yaml
- name: Integration tests (optional)
run: |
docker-compose up -d
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command 'docker-compose' is deprecated. Use 'docker compose' (without hyphen) instead, which is the modern Docker CLI plugin syntax.

Copilot uses AI. Check for mistakes.
# optionally wait / healthcheck
sleep 10
gleam test test/integration
docker-compose down -v
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command 'docker-compose' is deprecated. Use 'docker compose' (without hyphen) instead, which is the modern Docker CLI plugin syntax.

Copilot uses AI. Check for mistakes.
Enforces LF line endings for all files and specifically for .gleam files by updating the .gitattributes file.
Workflow errors on this file.
Deleted the encode_decode_roundtrip_test.gleam file, which contained tests for encoding and decoding various complex ClickHouse types to ensure correct JSON serialization. This may be part of a test suite cleanup or refactor.
Bump Gleam version from 1.11.0 to 1.13.0 in GitHub Actions workflows and update the required version badge in the README. Ensures consistency across documentation and CI environments.
Merged integration tests into the main CI workflow by adding ClickHouse setup and test steps to ci.yml, and removed the separate integration.yml workflow. Updated the README to remove the integration test badge, reflecting the unified workflow.
@lupodevelop lupodevelop merged commit 25c52f6 into main Nov 9, 2025
2 checks passed
@lupodevelop lupodevelop deleted the ci/workflow branch November 9, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants