Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: bitliu <bitliu@tencent.com>
  • Loading branch information
Xunzhuo committed Jan 17, 2023
1 parent f3b748e commit 5fbe529
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 62 deletions.
110 changes: 55 additions & 55 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,66 +7,66 @@ on:
branches: ["*"]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
# There are too many lint errors in current code bases
# uncomment when we decide what lint should be addressed or ignored.
# - run: make lint
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v3
# with:
# go-version: 1.19
# # There are too many lint errors in current code bases
# # uncomment when we decide what lint should be addressed or ignored.
# # - run: make lint

coverage-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# coverage-test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

# test
- name: Run Coverage Tests
run: GOPROXY="https://proxy.golang.org,direct" make go.test.coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: ./coverage.xml
verbose: true
# # test
# - name: Run Coverage Tests
# run: GOPROXY="https://proxy.golang.org,direct" make go.test.coverage
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# fail_ci_if_error: true
# files: ./coverage.xml
# verbose: true

build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: [lint,coverage-test]
steps:
- name: "Setup Go"
uses: actions/setup-go@v3
with:
go-version: 1.19
# build:
# # The type of runner that the job will run on
# runs-on: ubuntu-latest
# needs: [lint,coverage-test]
# steps:
# - name: "Setup Go"
# uses: actions/setup-go@v3
# with:
# go-version: 1.19

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: "checkout ${{ github.ref }}"
uses: actions/checkout@v3
with:
fetch-depth: 2
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - name: "checkout ${{ github.ref }}"
# uses: actions/checkout@v3
# with:
# fetch-depth: 2

- name: "Build Higress Binary"
run: GOPROXY="https://proxy.golang.org,direct" make build
# - name: "Build Higress Binary"
# run: GOPROXY="https://proxy.golang.org,direct" make build

- name: Upload Higress Binary
uses: actions/upload-artifact@v3
with:
name: higress
path: out/
# - name: Upload Higress Binary
# uses: actions/upload-artifact@v3
# with:
# name: higress
# path: out/

conformance-test:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3
# conformance-test:
# runs-on: ubuntu-latest
# needs: [build]
# steps:
# - uses: actions/checkout@v3

e2e-test:
runs-on: ubuntu-latest
needs: [build]
# needs: [build]
steps:
- name: "Setup Go"
uses: actions/setup-go@v3
Expand All @@ -75,8 +75,8 @@ jobs:
- uses: actions/checkout@v3
- run: make e2e-test

publish:
runs-on: ubuntu-latest
needs: [conformance-test,e2e-test]
steps:
- uses: actions/checkout@v3
# publish:
# runs-on: ubuntu-latest
# needs: [conformance-test,e2e-test]
# steps:
# - uses: actions/checkout@v3
14 changes: 7 additions & 7 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ ENVOY_LATEST_IMAGE_TAG ?= bf607ae5541ce5c1cc95b4f98b3fd50a83346d33
ISTIO_LATEST_IMAGE_TAG ?= bf607ae5541ce5c1cc95b4f98b3fd50a83346d33

install-dev: pre-install
helm install istio helm/istio -n istio-system --create-namespace --set-json='pilot.tag="$(ISTIO_LATEST_IMAGE_TAG)"'
helm install higress helm/higress -n higress-system --create-namespace --set-json='controller.tag="$(TAG)"' --set-json='gateway.replicas=1' --set-json='gateway.tag="$(ENVOY_LATEST_IMAGE_TAG)"'
helm install istio helm/istio -n istio-system --create-namespace --set-json='pilot.tag="$(ISTIO_LATEST_IMAGE_TAG)"' --set-json='global.kind=true'
helm install higress helm/higress -n higress-system --create-namespace --set-json='controller.tag="bf607ae5541ce5c1cc95b4f98b3fd50a83346d33"' --set-json='gateway.replicas=1' --set-json='gateway.tag="$(ENVOY_LATEST_IMAGE_TAG)"' --set-json='global.kind=true'

uninstall:
helm uninstall istio -n istio-system
Expand Down Expand Up @@ -181,7 +181,7 @@ include tools/tools.mk
include tools/lint.mk

.PHONY: e2e-test
e2e-test: $(tools/kind) create-cluster kube-load-image install-dev run-e2e-test delete-cluster
e2e-test: $(tools/kind) create-cluster install-dev run-e2e-test delete-cluster

create-cluster: $(tools/kind)
tools/hack/create-cluster.sh
Expand All @@ -197,11 +197,11 @@ kube-load-image: docker-build $(tools/kind) ## Install the EG image to a kind cl
.PHONY: run-e2e-test
run-e2e-test:
@echo "Running e2e tests"
kubectl apply -f samples/hello-world/quickstart.yaml

kubectl wait --timeout=5m -n higress-system deployment/higress-controller --for=condition=Available
kubectl wait --timeout=5m -n istio-system deployment/istiod --for=condition=Available
kubectl wait --timeout=5m -n higress-system deployment/higress-gateway --for=condition=Available

kubectl apply -f samples/hello-world/quickstart.yaml

curl -i -v http://127.0.0.1:80/foo
curl -i -v http://127.0.0.1:80/bar
curl -i -v http://localhost/foo
curl -i -v http://localhost/bar

0 comments on commit 5fbe529

Please sign in to comment.