diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 77b96b09b582d58010184e8c17518d1dcb6b3a04..a20fb8d48bb5e65e8ec1113c60dcb12e8f0393b5 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -59,9 +59,6 @@ jobs: go fmt ./... && git checkout -- go.mod && git status && [[ -z `git status -s` ]] # diff -u <(echo -n) <(gofmt -d -s .) - - name: hash - run: echo commit hash ${{github.event.pull_request.head.sha}} - - name: Install go ci lint run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0 @@ -74,7 +71,7 @@ jobs: - name: Integrate Test run: | - chmod +x integrate_test.sh && ./integrate_test.sh ${{github.event.pull_request.head.repo.full_name}} + 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) diff --git a/integrate_test.sh b/integrate_test.sh index 7522475d9a3df0a69f724cb9a316f815cb82f04f..e1bbc8c11b0195f7cc4f08946d57464c88e74f19 100644 --- a/integrate_test.sh +++ b/integrate_test.sh @@ -26,7 +26,7 @@ ROOT_DIR=$(pwd) echo "integrate-test root work-space -> ${ROOT_DIR}" # show all travis-env -echo "travis current commit id -> ${GITHUB_SHA}" +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}" @@ -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=$1 --build-arg PR_ORIGIN_COMMITID=${GITHUB_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=$1 --build-arg PR_ORIGIN_COMMITID=${GITHUB_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