-
Notifications
You must be signed in to change notification settings - Fork 22
232 lines (230 loc) · 8.77 KB
/
weekly.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
name: Weekly Testing
on:
schedule:
# Weekly on Monday at 10:18 am GMT, or 3:18 am Pacific Time.
- cron: '18 10 * * 1'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
jdk: ['11', '8']
steps:
- name: Checkout the project
uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}
- name: Build the project
run: cd connector && sbt package
- name: Upload the build artifact
uses: actions/upload-artifact@v3
with:
name: build-jar-file-${{ matrix.jdk }}
path: /home/runner/work/spark-connector/spark-connector/connector/target/scala-2.12/spark-vertica-connector_2.12-*.jar
run-spark-integration-tests-jdk8:
name: Run regression tests against different versions of Vertica
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
runtime: [ { spark: "[3.0.0, 3.1.0)", hadoop: "2.7.4" },
{ spark: "[3.1.0, 3.2.0)", hadoop: "3.2.0" },
{ spark: "[3.2.0, 3.3.0)", hadoop: "3.3.1" },
{ spark: "[3.3.0, 3.4.0)", hadoop: "3.3.2" } ]
vertica: ["11.1.1-2", "12.0.4-0" ]
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Remove existing docker containers
run: cd docker && docker-compose down
- name: Run docker compose
run: cd docker && docker-compose up -d
env:
SPARK_VERSION: ${{matrix.runtime.spark}}
HADOOP_VERSION: ${{matrix.runtime.hadoop}}
VERTICA_VERSION: ${{matrix.vertica}}
- name: Download the build artifact
uses: actions/download-artifact@v2
with:
name: build-jar-file-8
path: ./functional-tests/lib/
- name: Wait for Vertica to be available
uses: nick-invision/retry@v2
with:
timeout_seconds: 20
max_attempts: 10
retry_on: error
command: docker logs docker_vertica_1 | grep "Vertica container is now running" >/dev/null
- name: Run the integration tests
run: docker exec -w /spark-connector/functional-tests docker_client_1 sbt run
- name: Remove docker containers
run: cd docker && docker-compose down
run-spark-integration-tests-json:
name: Run regression tests using JSON export
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
runtime: [ { spark: "[3.0.0, 3.1.0)", hadoop: "2.7.4" },
{ spark: "[3.1.0, 3.2.0)", hadoop: "3.2.0" },
{ spark: "[3.2.0, 3.3.0)", hadoop: "3.3.1" },
{ spark: "[3.3.0, 3.4.0)", hadoop: "3.3.2" } ]
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Remove existing docker containers
run: cd docker && docker-compose down
- name: Run docker compose
run: cd docker && docker-compose up -d
env:
SPARK_VERSION: ${{matrix.runtime.spark}}
HADOOP_VERSION: ${{matrix.runtime.hadoop}}
VERTICA_VERSION: ${{matrix.vertica}}
- name: Download the build artifact
uses: actions/download-artifact@v2
with:
name: build-jar-file-11
path: ./functional-tests/lib/
- name: Wait for Vertica to be available
uses: nick-invision/retry@v2
with:
timeout_seconds: 20
max_attempts: 10
retry_on: error
command: docker logs docker_vertica_1 | grep "Vertica container is now running" >/dev/null
- name: Run the integration tests with JSON export
run: docker exec -w /spark-connector/functional-tests docker_client_1 sbt "run -j"
- name: Remove docker containers
run: cd docker && docker-compose down
run-spark-integration-tests-vertica-10:
name: Run integration tests against Vertica 10
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
runtime: [ { spark: "[3.0.0, 3.1.0)", hadoop: "2.7.4" },
{ spark: "[3.1.0, 3.2.0)", hadoop: "3.2.0" },
{ spark: "[3.2.0, 3.3.0)", hadoop: "3.3.1" },
{ spark: "[3.3.0, 3.4.0)", hadoop: "3.3.2" } ]
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Remove existing docker containers
run: cd docker && docker-compose down
- name: Run docker compose
run: cd docker && docker-compose up -d
env:
SPARK_VERSION: ${{matrix.runtime.spark}}
HADOOP_VERSION: ${{matrix.runtime.hadoop}}
VERTICA_VERSION: 10.1.1-0
- name: Download the build artifact
uses: actions/download-artifact@v2
with:
name: build-jar-file-11
path: ./functional-tests/lib/
- name: Wait for Vertica to be available
uses: nick-invision/retry@v2
with:
timeout_seconds: 20
max_attempts: 10
retry_on: error
command: docker logs docker_vertica_1 | grep "Vertica container is now running" >/dev/null
- name: Run the integration tests against Vertica 10
run: docker exec -w /spark-connector/functional-tests docker_client_1 sbt "run --v10"
- name: Remove docker containers
run: cd docker && docker-compose down
run-integration-tests-s3:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Download the build artifact
uses: actions/download-artifact@v2
with:
name: build-jar-file-11
path: ./functional-tests/lib/
- name: Add config options to application.conf
run: cd functional-tests && ./pipeline-s3-config.sh
env:
S3_FILEPATH: ${{secrets.S3_FILEPATH}}
- name: Build client image
run: docker build -t client ./docker/client
- name: Run docker compose
run: cd docker && docker-compose up -d
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
- name: Wait for Vertica to be available
uses: nick-invision/retry@v2
with:
timeout_seconds: 20
max_attempts: 10
retry_on: error
command: docker logs docker_vertica_1 | grep "Vertica container is now running" >/dev/null
- name: Run the integration tests against S3
run: docker exec -w /spark-connector/functional-tests docker_client_1 sbt run
- name: Remove docker containers
run: cd docker && docker-compose down
run-integration-tests-gcs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Download the build artifact
uses: actions/download-artifact@v2
with:
name: build-jar-file-11
path: ./functional-tests/lib/
- name: Add config options to application.conf
run: cd functional-tests && ./pipeline-gcs-config.sh
env:
GCS_FILEPATH: ${{secrets.GCS_FILEPATH}}
- name: Build client image
run: docker build -t client ./docker/client
- name: Run docker compose
run: cd docker && docker-compose up -d
env:
GCS_HMAC_KEY_ID: ${{secrets.GCS_HMAC_KEY_ID}}
GCS_HMAC_KEY_SECRET: ${{secrets.GCS_HMAC_KEY_SECRET}}
GCS_SERVICE_KEY_ID: ${{secrets.GCS_SERVICE_KEY_ID}}
GCS_SERVICE_KEY: ${{secrets.GCS_SERVICE_KEY}}
GCS_SERVICE_EMAIL: ${{secrets.GCS_SERVICE_EMAIL}}
- name: Wait for Vertica to be available
uses: nick-invision/retry@v2
with:
timeout_seconds: 20
max_attempts: 10
retry_on: error
command: docker logs docker_vertica_1 | grep "Vertica container is now running" >/dev/null
- name: Run the integration tests against GCS
run: docker exec -w /spark-connector/functional-tests docker_client_1 sbt run
- name: Remove docker containers
run: cd docker && docker-compose down
slack-workflow-status:
name: Post Workflow Status To Slack
runs-on: ubuntu-latest
needs: [build,
run-spark-integration-tests-jdk8,
run-spark-integration-tests-json,
run-spark-integration-tests-vertica-10,
run-integration-tests-gcs,
run-integration-tests-s3,]
if: failure()
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
if: always()
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
slack_webhook_url: ${{secrets.SLACK_CHANNEL_WEBHOOK}}
name: 'Weekly tests failed'
icon_emoji: ':sadge:'
include_jobs: false