forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
195 lines (183 loc) · 6.04 KB
/
Copy pathcomplete.yml
File metadata and controls
195 lines (183 loc) · 6.04 KB
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
name: complete
on: [push, pull_request]
jobs:
build-push-docker-images:
runs-on: [self-hosted]
strategy:
matrix:
component: [core, serving, jobservice, jupyter]
env:
GITHUB_PR_SHA: ${{ github.event.pull_request.head.sha }}
REGISTRY: gcr.io/kf-feast
MAVEN_CACHE: gs://feast-templocation-kf-feast/.m2.2020-08-19.tar
steps:
- uses: actions/checkout@v2
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '290.0.1'
export_default_credentials: true
- run: gcloud auth configure-docker --quiet
- name: Get m2 cache
run: |
infra/scripts/download-maven-cache.sh \
--archive-uri ${MAVEN_CACHE} \
--output-dir .
- name: Build image
run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA}
- name: Push image
run: |
docker push ${REGISTRY}/feast-${{ matrix.component }}:${GITHUB_SHA}
if [ -n "${GITHUB_PR_SHA}" ]; then
docker tag ${REGISTRY}/feast-${{ matrix.component }}:${GITHUB_SHA} gcr.io/kf-feast/feast-${{ matrix.component }}:${GITHUB_PR_SHA}
docker push ${REGISTRY}/feast-${{ matrix.component }}:${GITHUB_PR_SHA}
fi
lint-java:
container: gcr.io/kf-feast/feast-ci:latest
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Lint java
run: make lint-java
lint-python:
container: gcr.io/kf-feast/feast-ci:latest
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: make install-python-ci-dependencies
- name: Compile protos
run: make compile-protos-python
- name: Lint python
run: make lint-python
lint-go:
container: gcr.io/kf-feast/feast-ci:latest
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: make install-go-ci-dependencies
- name: Lint go
run: make lint-go
lint-versions:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Lint versions throughout repo
run: make lint-versions
unit-test-java:
runs-on: ubuntu-latest
needs: lint-java
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
java-package: jdk
architecture: x64
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-ut-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-ut-maven-
- name: Test java
run: make test-java-with-coverage
- uses: actions/upload-artifact@v2
with:
name: java-coverage-report
path: ${{ github.workspace }}/docs/coverage/java/target/site/jacoco-aggregate/
unit-test-python:
runs-on: ubuntu-latest
needs: lint-python
container: gcr.io/kf-feast/feast-ci:latest
steps:
- uses: actions/checkout@v2
- name: Install python
run: make install-python
- name: Test python
run: make test-python
unit-test-go:
runs-on: ubuntu-latest
needs: lint-go
container: gcr.io/kf-feast/feast-ci:latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: make compile-protos-go
- name: Test go
run: make test-go
integration-test:
runs-on: ubuntu-latest
needs: unit-test-java
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
java-package: jdk
architecture: x64
- uses: actions/setup-python@v2
with:
python-version: '3.6'
architecture: 'x64'
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-it-maven-
- name: Run integration tests
run: make test-java-integration
- name: Save report
uses: actions/upload-artifact@v2
if: failure()
with:
name: it-report
path: spark/ingestion/target/test-reports/TestSuite.txt
retention-days: 5
tests-docker-compose:
needs:
- build-push-docker-images
- publish-ingestion-jar
runs-on: ubuntu-latest
env:
INGESTION_JAR_PATH: /shared/feast-ingestion-spark-develop.jar
steps:
- uses: actions/checkout@v2
- name: Download ingestion jar
uses: actions/download-artifact@v2
with:
name: ingestion-jar
path: ./infra/docker-compose/
- name: Test docker compose
run: ./infra/scripts/test-docker-compose.sh ${GITHUB_SHA}
publish-ingestion-jar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: build-jar
env:
# Try to add retries to prevent connection resets
# https://github.community/t/getting-maven-could-not-transfer-artifact-with-500-error-when-using-github-actions/17570
# https://github.com/actions/virtual-environments/issues/1499#issuecomment-718396233
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3 -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
MAVEN_EXTRA_OPTS: -X
run: make build-java-no-tests REVISION=develop
- name: Upload ingestion jar
uses: actions/upload-artifact@v2
with:
name: ingestion-jar
path: spark/ingestion/target/feast-ingestion-spark-develop.jar
retention-days: 1