Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: integration test in Github action #1012

Merged
merged 7 commits into from
Jan 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:

- name: Integrate Test
run: |
chmod +x integrate_test.sh && ./integrate_test.sh
chmod +x integrate_test.sh && ./integrate_test.sh ${{github.event.pull_request.head.repo.full_name}} ${{github.event.pull_request.head.sha}}

- name: Post Coverage
run: bash <(curl -s https://codecov.io/bash)
Expand Down
16 changes: 8 additions & 8 deletions integrate_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ ROOT_DIR=$(pwd)
echo "integrate-test root work-space -> ${ROOT_DIR}"

# show all travis-env
echo "travis current commit id -> ${TRAVIS_COMMIT}"
echo "travis pull request -> ${TRAVIS_PULL_REQUEST}"
echo "travis pull request branch -> ${TRAVIS_PULL_REQUEST_BRANCH}"
echo "travis pull request slug -> ${TRAVIS_PULL_REQUEST_SLUG}"
echo "travis pull request sha -> ${TRAVIS_PULL_REQUEST_SHA}"
echo "travis pull request repo slug -> ${TRAVIS_REPO_SLUG}"
echo "travis current commit id -> $2"
echo "travis pull request branch -> ${GITHUB_REF}"
echo "travis pull request slug -> ${GITHUB_REPOSITORY}"
echo "travis pull request repo slug -> ${GITHUB_REPOSITORY}"
echo "travis pull request actor -> ${GITHUB_ACTOR}"
echo "travis pull request repo param -> $1"


# #start etcd registry insecure listen in [:]:2379
Expand All @@ -53,13 +53,13 @@ echo "zookeeper listen in [:]2181"

# build go-server image
cd ./test/integrate/dubbo/go-server
docker build . -t ci-provider --build-arg PR_ORIGIN_REPO=${TRAVIS_PULL_REQUEST_SLUG} --build-arg PR_ORIGIN_COMMITID=${TRAVIS_PULL_REQUEST_SHA}
docker build . -t ci-provider --build-arg PR_ORIGIN_REPO=$1 --build-arg PR_ORIGIN_COMMITID=$2
cd ${ROOT_DIR}
docker run -d --network host ci-provider

# build go-client image
cd ./test/integrate/dubbo/go-client
docker build . -t ci-consumer --build-arg PR_ORIGIN_REPO=${TRAVIS_PULL_REQUEST_SLUG} --build-arg PR_ORIGIN_COMMITID=${TRAVIS_PULL_REQUEST_SHA}
docker build . -t ci-consumer --build-arg PR_ORIGIN_REPO=$1 --build-arg PR_ORIGIN_COMMITID=$2
cd ${ROOT_DIR}
# run provider
# check consumer status
Expand Down