mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
Add integration test workflow (#23976)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
7e0d1492c7
commit
38e60804a4
35
.github/workflows/main.yaml
vendored
35
.github/workflows/main.yaml
vendored
@ -180,6 +180,41 @@ jobs:
|
||||
*.info
|
||||
*.out
|
||||
.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:
|
||||
name: Upload Code Coverage
|
||||
needs: [UT-Cpp, UT-Go]
|
||||
|
40
scripts/run_intergration_test.sh
Executable file
40
scripts/run_intergration_test.sh
Executable 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"
|
||||
|
Loading…
Reference in New Issue
Block a user