forked from cloudquery/cloudquery
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (75 loc) · 2.45 KB
/
dest_clickhouse.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Destination Plugin ClickHouse Workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- plugins/destination/clickhouse/**
- .github/workflows/dest_clickhouse.yml
push:
branches:
- main
paths:
- plugins/destination/clickhouse/**
- .github/workflows/dest_clickhouse.yml
jobs:
plugins-destination-clickhouse:
name: "plugins/destination/clickhouse"
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DB_USER: cq
DB_PASSWORD: test
DB_NAME: cloudquery
defaults:
run:
working-directory: plugins/destination/clickhouse
services:
clickhouse:
image: clickhouse/clickhouse-server:22.1.2
env:
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
CLICKHOUSE_PASSWORD: ${{ env.DB_PASSWORD }}
CLICKHOUSE_USER: ${{ env.DB_USER }}
CLICKHOUSE_DB: ${{ env.DB_NAME }}
ports:
- 8123:8123
- 9000:9000
options: >-
--ulimit nofile=262144:262144
--health-cmd "wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1"
--health-interval 60s
--health-timeout 30s
--health-start-period 20s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: plugins/destination/clickhouse/go.mod
cache: true
cache-dependency-path: plugins/destination/clickhouse/go.sum
- name: golangci-lint
uses: cloudquery/golangci-lint-action@master
with:
version: v1.55.2
working-directory: plugins/destination/clickhouse
args: "--config ../../.golangci.yml"
skip-pkg-cache: true
skip-build-cache: true
- name: gen
if: github.event_name == 'pull_request'
run: make gen
- name: Fail if generation updated files
if: github.event_name == 'pull_request'
run: test "$(git status -s | wc -l)" -eq 0 || (git status -s; exit 1)
- name: Build
run: go build .
- name: Test ClickHouse
env:
CQ_DEST_CH_TEST_CONN: "clickhouse://${{ env.DB_USER }}:${{ env.DB_PASSWORD }}@localhost:9000/${{ env.DB_NAME }}"
run: make test