Skip to content

Commit

Permalink
feat: add e2e workflow and make command
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed May 8, 2024
1 parent 6d6e5b1 commit 61b685d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#
# Copyright (C) 2019-2024 vdaas.org vald team <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DO NOT EDIT
name: "Run E2E test"
on:
push:
branches:
- main
pull_request:

jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# TODO: change to the following before main merge.
# - uses: vdaas/vald-client-ci/.github/actions/e2e@main
- uses: vdaas/vald-client-ci/.github/actions/e2e@feat/add-common-workflows
with:
client_type: clj
# build-test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: debug for build
# run: |
# echo "Install dependencies"
# make ci/deps/install
#
# NPM_BIN=$(npm prefix)
# ls ${NPM_BIN}/node_modules/@bufbuild/buf/bin/buf
#
# echo "Build proto"
# export GOPATH=$HOME/go
# export PATH=$HOME/grpc-java:$PATH
# make proto
# make vald/sha/update
# make vald/client/version/update
#
# echo "Update dependencies"
# make ci/deps/update
#
# git diff
# git diff --name-only
# - uses: vdaas/vald-client-ci/.github/actions/e2e@feat/add-common-workflows
# with:
# client_type: node
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ pom.xml.asc
.hgignore
.hg/
/valdcli
/vald

wordvecs1000.json
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ NATIVE_IMAGE_CONFIG_OUTPUT_DIR=native-config

TARGET_JAR=target/vald-client-clj-$(VERSION)-standalone.jar

TEST_DATASET_PATH = wordvecs1000.json

.PHONY: all
all: clean

Expand Down Expand Up @@ -73,3 +75,21 @@ valdcli: $(TARGET_JAR)
-J-Dclojure.spec.skip-macros=true \
-J-Xms$(XMS) \
-J-Xmx$(XMX)

.PHONY: test
## Execute test
test: $(TEST_DATASET_PATH)
./lein test

$(TEST_DATASET_PATH):
curl -L https://raw.githubusercontent.com/rinx/word2vecjson/master/data/wordvecs1000.json -o $(TEST_DATASET_PATH)

.PHONY: ci/deps/install
## install deps for CI environment
ci/deps/install:
@echo "Nothing do be done"

.PHONY: ci/deps/update
## update deps for CI environment
ci/deps/update:
@echo "Nothing do be done"

0 comments on commit 61b685d

Please sign in to comment.