-
Notifications
You must be signed in to change notification settings - Fork 53
74 lines (65 loc) · 1.82 KB
/
e2e.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
name: e2e
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
go:
- "oldstable"
- "stable"
clickhouse:
- v21.8.14.5-lts
- v22.3.11.12-lts
- v22.8.5.29-lts
- v22.8.20.11-lts
- v23.3.8.21-lts
- v23.8.7.24-lts
- v23.10.3.5-stable
- v24.8.4.13-lts
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Get Go environment
id: go-env
run: |
echo "::set-output name=cache::$(go env GOCACHE)"
echo "::set-output name=modcache::$(go env GOMODCACHE)"
- name: Set up cache
uses: actions/cache@v4
with:
path: |
${{ steps.go-env.outputs.cache }}
${{ steps.go-env.outputs.modcache }}
key: e2e-${{ runner.os }}-go${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
e2e-${{ runner.os }}-go${{ matrix.go }}-
- name: Set up ClickHouse cache
uses: actions/cache@v4
with:
path: /opt/ch/clickhouse
key: ClickHouse-${{ matrix.clickhouse }}
- name: Check ClickHouse
id: "ch_exists"
uses: andstor/file-existence-action@v3
with:
files: /opt/ch/clickhouse
- name: Download ClickHouse
if: steps.ch_exists.outputs.files_exists != 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: cd internal/cmd/ch-dl && go run . ${{ matrix.clickhouse }}
- name: Run tests
env:
CH_BIN: "/opt/ch/clickhouse"
CH_E2E: "TRUE"
run: go test -v ./...