Skip to content

Commit 4a2d721

Browse files
committed
Consolidate CI and integration workflows
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.
1 parent 72d4d1c commit 4a2d721

3 files changed

Lines changed: 28 additions & 88 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,29 @@ on:
77
branches: [main]
88

99
jobs:
10-
unit-tests:
11-
name: Unit Tests
10+
test:
11+
name: Build and Test
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
1616

17+
- name: Start ClickHouse
18+
run: |
19+
docker compose up -d clickhouse
20+
echo "Waiting for ClickHouse to be ready..."
21+
for i in $(seq 1 60); do
22+
if curl -sSf http://localhost:8123/ >/dev/null 2>&1; then
23+
echo "ClickHouse is ready"
24+
break
25+
fi
26+
sleep 2
27+
done
28+
1729
- name: Setup Erlang/OTP and Gleam
1830
uses: erlef/setup-beam@v1
1931
with:
20-
otp-version: "26.0"
32+
otp-version: "27.0"
2133
gleam-version: "1.13.0"
2234

2335
- name: Show Gleam version
@@ -31,9 +43,9 @@ jobs:
3143
~/.gleam
3244
./_gleam_deps
3345
./build
34-
key: ${{ runner.os }}-gleam-1.13.0-cache-v1-${{ hashFiles('**/gleam.toml') }}
46+
key: ${{ runner.os }}-gleam-1.13.0-otp27-cache-v1-${{ hashFiles('**/gleam.toml') }}
3547
restore-keys: |
36-
${{ runner.os }}-gleam-1.13.0-cache-v1-
48+
${{ runner.os }}-gleam-1.13.0-otp27-cache-v1-
3749
3850
- name: Install dependencies
3951
run: gleam deps download
@@ -44,5 +56,14 @@ jobs:
4456
- name: Build project
4557
run: gleam build
4658

47-
- name: Run unit tests
59+
- name: Run all tests
60+
env:
61+
CLICKHOUSE_USER: test_user
62+
CLICKHOUSE_PASSWORD: test_password
63+
CLICKHOUSE_DB: test_db
64+
CLICKHOUSE_URL: http://localhost:8123
4865
run: gleam test
66+
67+
- name: Cleanup ClickHouse
68+
if: always()
69+
run: docker compose down -v

.github/workflows/integration.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<img src="assets/image.png" alt="Sparkling logo" width="240" />
55
</p>
66

7-
[![CI](https://github.com/lupodevelop/sparkling/actions/workflows/ci.yml/badge.svg)](https://github.com/lupodevelop/sparkling/actions/workflows/ci.yml) [![Integration Tests](https://github.com/lupodevelop/sparkling/actions/workflows/integration.yml/badge.svg)](https://github.com/lupodevelop/sparkling/actions/workflows/integration.yml) [![License](https://img.shields.io/badge/license-Apache%202.0-yellow.svg)](LICENSE) [![Built with Gleam](https://img.shields.io/badge/Built%20with-Gleam-ffaff3)](https://gleam.run) [![Gleam Version](https://img.shields.io/badge/gleam-%3E%3D1.13.0-ffaff3)](https://gleam.run)
7+
[![CI](https://github.com/lupodevelop/sparkling/actions/workflows/ci.yml/badge.svg)](https://github.com/lupodevelop/sparkling/actions/workflows/ci.yml) [![License](https://img.shields.io/badge/license-Apache%202.0-yellow.svg)](LICENSE) [![Built with Gleam](https://img.shields.io/badge/Built%20with-Gleam-ffaff3)](https://gleam.run) [![Gleam Version](https://img.shields.io/badge/gleam-%3E%3D1.13.0-ffaff3)](https://gleam.run)
88

99
**Sparkling** is a *lightweight*, **type-safe** data layer for **ClickHouse** written in Gleam. It provides a small, focused API for defining schemas, building queries, and encoding/decoding ClickHouse formats.
1010

0 commit comments

Comments
 (0)