Skip to content

Commit

Permalink
add github action workflow
Browse files Browse the repository at this point in the history
Signed-off-by: YaoZengzeng <yaozengzeng@huawei.com>
  • Loading branch information
YaoZengzeng committed Jun 19, 2024
1 parent 8a02aed commit 54f7afe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
- name: Go Test
run: |
sudo env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:$GITHUB_WORKSPACE/api/v2-c:$GITHUB_WORKSPACE/bpf/deserialization_to_bpf_map PKG_CONFIG_PATH=$GITHUB_WORKSPACE/mk go test -v -vet=off -coverprofile=coverage.out ./pkg/...
- name: E2E Test
run: |
make e2e
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
Expand Down
13 changes: 13 additions & 0 deletions test/e2e/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,17 @@ function build_and_push_images() {
HUB="${KIND_REGISTRY}" make docker.push
}

function install_dependencies() {
# 1. Install kind.
go install sigs.k8s.io/kind@v0.23.0
}

while (( "$#" )); do
case "$1" in
--skip-install-dep)
SKIP_INSTALL_DEPENDENCIES=true
shift
;;
--skip-setup)
SKIP_SETUP=true
shift
Expand All @@ -102,6 +111,10 @@ while (( "$#" )); do
esac
done

if [[ -z "${SKIP_INSTALL_DEPENDENCIES:-}" ]]; then
install_dependencies
fi

if [[ -z "${SKIP_SETUP:-}" ]]; then
setup_kind_cluster
fi
Expand Down

0 comments on commit 54f7afe

Please sign in to comment.