Skip to content

Commit 20e0350

Browse files
author
maxim-lixakov
committed
[DOP-16956] - add Clickhouse CI
1 parent 9559137 commit 20e0350

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Change Summary
2+
3+
<!-- Please give a short summary of the changes. -->
4+
5+
## Related issue number
6+
7+
<!-- Are there any issues opened that will be resolved by merging this change? -->
8+
<!-- WARNING: please use "fix #123" style references so the issue is closed when this PR is merged. -->
9+
10+
## Checklist
11+
12+
* [ ] Commit message and PR title is comprehensive
13+
* [ ] Keep the change as small as possible
14+
* [ ] Unit and integration tests for the changes exist
15+
* [ ] Tests pass on CI and coverage does not decrease
16+
* [ ] Documentation reflects the changes where applicable
17+
* [ ] My PR is ready to review.

.github/workflows/clickhouse_ci.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Scala CI with ClickHouse
2+
3+
on: [push] # temporarily
4+
5+
#on:
6+
# push:
7+
# branches:
8+
# - develop
9+
# pull_request:
10+
# branches:
11+
# - develop
12+
# - master
13+
14+
jobs:
15+
build:
16+
name: Clickhouse CI
17+
runs-on: ubuntu-latest
18+
services:
19+
clickhouse:
20+
image: clickhouse/clickhouse-server
21+
env:
22+
TZ: UTC
23+
ports:
24+
- 8123:8123
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Setup JDK 8
30+
uses: actions/setup-java@v4
31+
with:
32+
java-version: '8'
33+
distribution: 'temurin'
34+
35+
- name: Setup Scala and SBT
36+
uses: olafurpg/setup-scala@v14
37+
with:
38+
java-version: '8'
39+
40+
- name: Cache SBT and Ivy dependencies
41+
uses: actions/cache@v4
42+
with:
43+
path: |
44+
~/.sbt
45+
~/.ivy2/cache
46+
~/.cache/coursier
47+
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt', '**/plugins.sbt') }}
48+
restore-keys: |
49+
${{ runner.os }}-sbt-
50+
51+
- name: Compile .jar package with SBT
52+
run: |
53+
sbt package
54+
55+
- name: Run Integration Tests with Coverage
56+
run: |
57+
sbt clean coverage test coverageReport
58+
59+
- name: Upload Coverage to Codecov
60+
uses: codecov/codecov-action@v4
61+
with:
62+
token: ${{ secrets.CODECOV_TOKEN }}
63+
files: target/scala-2.12/scoverage-report/scoverage.xml
64+
fail_ci_if_error: true

project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
addSbtPlugin("org.scalameta" %% "sbt-scalafmt" % "2.5.2")
2+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.10")

0 commit comments

Comments
 (0)