Add integration test workflow (#23976)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2023-05-09 19:18:41 +08:00 committed by GitHub
parent 7e0d1492c7
commit 38e60804a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 75 additions and 0 deletions

View File

@ -180,6 +180,41 @@ jobs:
*.info *.info
*.out *.out
.git .git
integration-test:
name: Integration Test
needs: Build
runs-on: ubuntu-${{ matrix.ubuntu }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
ubuntu: [20.04]
env:
UBUNTU: ${{ matrix.ubuntu }}
steps:
- name: Download code
uses: actions/download-artifact@v3.0.1
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Cache Go Mod Volumes
uses: actions/cache@v3
with:
path: .docker/amd64-ubuntu${{ matrix.ubuntu }}-go-mod
key: ubuntu${{ matrix.ubuntu }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: ubuntu${{ matrix.ubuntu }}-go-mod-
- name: Start Service
shell: bash
run: |
docker-compose up -d pulsar etcd minio
- name: IntegrationTest
continue-on-error: true # do not impact ci-passed for now
run: |
chmod +x build/builder.sh
chmod +x scripts/run_intergration_test.sh
./build/builder.sh /bin/bash -c ./scripts/run_intergration_test.sh
codecov: codecov:
name: Upload Code Coverage name: Upload Code Coverage
needs: [UT-Cpp, UT-Go] needs: [UT-Cpp, UT-Go]

View File

@ -0,0 +1,40 @@
#!/usr/bin/env bash
# Licensed to the LF AI & Data foundation under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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
#
# http://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.
# run integration test
echo "Running integration test uner ./tests/integration"
BASEDIR=$(dirname "$0")
source $BASEDIR/setenv.sh
set -ex
# starting the timer
beginTime=`date +%s`
if [[ $(uname -s) == "Darwin" && "$(uname -m)" == "arm64" ]]; then
APPLE_SILICON_FLAG="-tags dynamic"
fi
pushd tests/integration
go test -race ${APPLE_SILICON_FLAG} -v --failfast
popd
endTime=`date +%s`
echo "Total time for go integration test:" $(($endTime-$beginTime)) "s"