Skip to content

Commit 1c15f65

Browse files
authored
Add GitHub Action for Linting (#559)
* Add linting workflow to project * Refactor makefile to have java dependency installation and go tests
1 parent 6a79015 commit 1c15f65

2 files changed

Lines changed: 39 additions & 7 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
lint-java:
11+
container: gcr.io/kf-feast/feast-ci:latest
12+
runs-on: [ubuntu-latest]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Lint Java
16+
run: make lint-java
17+
18+
lint-python:
19+
container: gcr.io/kf-feast/feast-ci:latest
20+
runs-on: [ubuntu-latest]
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Lint Python
25+
run: make lint-python
26+
27+
lint-go:
28+
container: gcr.io/kf-feast/feast-ci:latest
29+
runs-on: [ubuntu-latest]
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Lint Go
33+
run: make lint-go

Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,18 @@ format: format-python format-go format-java
2424

2525
lint: lint-python lint-go lint-java
2626

27-
test: test-python test-java
27+
test: test-python test-java test-go
2828

2929
protos: compile-protos-go compile-protos-python compile-protos-docs
3030

3131
build: protos build-java build-docker build-html
3232

33-
install-ci-dependencies: install-python-ci-dependencies install-go-ci-dependencies
33+
install-ci-dependencies: install-python-ci-dependencies install-go-ci-dependencies install-java-ci-dependencies
3434

3535
# Java
3636

3737
install-java-ci-dependencies:
38-
cd core; mvn dependency:go-offline
39-
cd serving; mvn dependency:go-offline
40-
cd ingestion; mvn dependency:go-offline
38+
mvn verify clean --fail-never
4139

4240
format-java:
4341
mvn spotless:apply
@@ -82,6 +80,9 @@ install-go-ci-dependencies:
8280
compile-protos-go:
8381
@$(foreach dir,$(PROTO_TYPE_SUBDIRS), cd ${ROOT_DIR}/protos; protoc -I/usr/local/include -I. --go_out=plugins=grpc,paths=source_relative:../sdk/go/protos/ feast/$(dir)/*.proto;)
8482

83+
test-go:
84+
cd ${ROOT_DIR}/sdk/go; go test ./...
85+
8586
format-go:
8687
cd ${ROOT_DIR}/sdk/go; gofmt -s -w *.go
8788

@@ -116,8 +117,6 @@ build-serving-docker:
116117
build-ci-docker:
117118
docker build -t $(REGISTRY)/feast-ci:latest -f infra/docker/ci/Dockerfile .
118119

119-
120-
121120
# Documentation
122121

123122
install-dependencies-proto-docs:

0 commit comments

Comments
 (0)