Merge pull request #724 from taosdata/fix/TD-27534 #1619
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coveralls (3.0) | |
on: | |
push: | |
branches: | |
- develop | |
- 3.0 | |
- main | |
pull_request: | |
branches: | |
- develop | |
- 3.0 | |
- main | |
env: | |
TOOLS_BUILD_TYPE: Debug | |
PR_NUMBER: ${{ github.event.number }} | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run test for Coveralls report | |
uses: actions/checkout@v3 | |
with: | |
path: 'taos-tools' | |
ref: 'develop' | |
- name: Step that prints name of pull request's base branch | |
run: | | |
echo "Pull request's base branch is: ${BASE_BRANCH}" | |
echo "Pull request's branch is: ${GITHUB_REF##*/}" | |
echo "Pull request's head ref is: ${GITHUB_HEAD_REF}" | |
env: | |
BASE_BRANCH: ${{ github.base_ref }} | |
if: github.event_name == 'pull_request' | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/[email protected] | |
- name: List all changed files | |
run: | | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
echo "$file was changed" | |
done | |
- name: Get specific changed files | |
id: changed-files-specific | |
uses: tj-actions/[email protected] | |
with: | |
files: | | |
src/* | |
inc/* | |
deps/* | |
tests/taosbenchmark/* | |
tests/taosdump/* | |
packaging/tools/* | |
.github/workflows/3.0-coveralls.yml | |
- name: Run step if any of the listed files above change | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: | | |
echo "One or more files listed above has changed." | |
- name: Checkout TDengine | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
uses: actions/checkout@v2 | |
with: | |
repository: 'taosdata/TDengine' | |
path: 'TDengine' | |
ref: ${{ github.event.pull_request.base.ref }} | |
- name: Change time zone | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo timedatectl set-timezone Asia/Shanghai | |
sudo date | |
- name: Set up Go | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.17 | |
- name: Set up Rust | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
uses: actions-rs/[email protected] | |
with: | |
toolchain: stable | |
- uses: actions/cache@v3 | |
id: cache-rust | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ steps.setup-rust.outputs.rustc_hash }} | |
- uses: actions/cache@v3 | |
id: cache-rust-target | |
with: | |
path: | | |
TDengine/tools/taosws-rs/target/ | |
key: ${{ runner.os }}-cargo-target-${{ steps.setup-rust.outputs.rustc_hash }} | |
- name: first build TDengine | |
if: | | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
whoami | |
sudo apt update > /dev/null | |
sudo apt install libgflags2.2 libgflags-dev -y > /dev/null | |
cd TDengine | |
mkdir debug ||: | |
cd debug | |
cmake .. -DBUILD_JDBC=false -DBUILD_HTTP=false -DWEBSOCKET=true > /dev/null | |
make -j2 > /dev/null && sudo make install > /dev/null && cd .. && rm -rf debug | |
if [[ ! -f /usr/local/taos/bin/taosd ]] || [[ ! -f /usr/local/taos/bin/taosadapter ]] | |
then | |
echo "TDengine build failure" | |
exit 1 | |
fi | |
- name: show TDengine's taosws commit | |
if: | | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
cd TDengine/tools/taosws-rs | |
git log --oneline | head -1 | |
- name: Install packages for build taos-tools | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo apt update > /dev/null | |
sudo apt-get install lzma-dev liblzma-dev libjansson-dev libz-dev zlib1g libsnappy-dev pkg-config lcov expect -y > /dev/null | |
- name: Checkout taos-tools to PR number | |
if: | | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
run: | | |
git fetch origin +refs/pull/${{env.PR_NUMBER}}/merge | |
git checkout -qf FETCH_HEAD | |
- name: build taos-tools | |
if: | | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
mkdir debug ||: | |
cd debug | |
cmake .. -DTOOLS_BUILD_TYPE=${{env.TOOLS_BUILD_TYPE}} -DWEBSOCKET=true -DTOOLS_COVER=true > /dev/null | |
make -j8 > /dev/null && sudo make install > /dev/null | |
if [[ ! -f /usr/local/taos/bin/taosdump ]] || [[ ! -f /usr/local/taos/bin/taosBenchmark ]] | |
then | |
echo "taos-tools build failure" | |
exit 1 | |
fi | |
pip3 install decorator numpy fabric2 psutil pandas faker toml taospy > /dev/null | |
- name: exp Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
echo "TEST: taodump -p" | |
cd tests/taosdump | |
./exp.sh | |
- name: taosBenchmark Command Line Basic Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd debug | |
echo "TEST: taosBenchmark --help" | |
./build/bin/taosBenchmark --help > /dev/null | |
echo "TEST: taosBenchmark -V" | |
./build/bin/taosBenchmark -V | |
echo "TEST: taoBenchmark -w 16375" | |
./build/bin/taosBenchmark -b binary -A bool -w 16375 > /dev/null || : | |
echo "TEST: taoBenchmark -D NotANumber" | |
./build/bin/taosBenchmark -D NotANumber > /dev/null || : | |
echo "TEST: taosBenchmark -v NotANumber" | |
./build/bin/taosBenchmark -v NotANumber > /dev/null || : | |
echo "TEST: taosBenchmark -o out.txt" | |
./build/bin/taosBenchmark -t 1 -n 1 -o out.txt -y > /dev/null | |
echo "TEST: taosBenchmark -c /etc/taos" | |
./build/bin/taosBenchmark -c /etc/taos -t 1 -n 1 -y > /dev/null | |
echo "TEST: kill taosBenchmark" | |
./build/bin/taosBenchmark -t 1 -n 100 -B 1 -i 1000 -r 1 -y & | |
sleep 5 | |
pkill -INT taosBenchmark | |
- name: taosdump Command Line Basic Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd debug | |
echo "TEST: taodump --help" | |
./build/bin/taosdump --help > /dev/null | |
echo "TEST: taodump --version" | |
./build/bin/taosdump --version > /dev/null | |
echo "TEST: taodump -c" | |
./build/bin/taosdump -c > /dev/null || : | |
./build/bin/taosdump -c not-exist > /dev/null || : | |
echo "TEST: taodump --port 100000" | |
./build/bin/taosdump --port 100000 > /dev/null || : | |
echo "TEST: taodump --port NotANumber" | |
./build/bin/taosdump --port NotANumber > /dev/null || : | |
echo "TEST: taodump -D" | |
./build/bin/taosdump -D > /dev/null || : | |
echo "TEST: taodump --databases -h localhost -u root" | |
./build/bin/taosdump --databases -h localhost -u root > /dev/null || : | |
echo "TEST: taodump -C" | |
./build/bin/taosdump -C > /dev/null || : | |
rm -rf *.sql *.avro* taosdump.* | |
./build/bin/taosdump -C https://not-exist.com:80/cloud -D test ||: | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: taodump with env var" | |
export TDENGINE_CLOUD_DSN=https://not-exist.com:80/cloud | |
./build/bin/taosdump -D test ||: | |
unset TDENGINE_CLOUD_DSN | |
rm -rf *.sql *.avro* taosdump.* | |
# test codec | |
- name: taosdump codec Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd debug | |
echo "TEST: simple and log database" | |
./build/bin/taosBenchmark -t 1 -n 1 -y | |
./build/bin/taosdump -D test -a | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: complex columns" | |
./build/bin/taosBenchmark -t 2 -n 10 -b bool,tinyint,smallint,int,bigint,float,double,utinyint,usmallint,uint,ubigint,binary,nchar,timestamp -A bool,tinyint,smallint,int,bigint,float,double,utinyint,usmallint,uint,ubigint,binary,nchar,timestamp -y > /dev/null | |
echo "TEST: whole db with null codec" | |
./build/bin/taosdump -D test -d null -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -d null -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: whole db with snappy codec" | |
./build/bin/taosdump -D test -d snappy -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -d snappy -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: whole db with deflate codec" | |
./build/bin/taosdump -D test -d deflate -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -d deflate -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: whole db with lzma codec" | |
./build/bin/taosdump -D test -d lzma -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -d lzma -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: whole db with unknown codec" | |
./build/bin/taosBenchmark -t 2 -n 2 -y > /dev/null | |
./build/bin/taosdump -D test -d unknown -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -d unknown -gg > /dev/null | |
taos -s "select count(*) from test.meters"|grep "4 |" && echo success || exit $? | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: single normal table with unknown codec" | |
./build/bin/taosdump test d0 -d unknown -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -d unknown -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: unknown codec" | |
./build/bin/taosdump -D test -d unknown -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -d unknown -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
- name: taosdump time Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd debug | |
echo "TEST: epoch time and batch" | |
./build/bin/taosdump -D test -S 1500000000000 -E 1500000000004 -B 10 -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: human time" | |
./build/bin/taosdump -D test -S '2017-07-14 10:40:00.000' -E '2017-07-14 10:40:00.004' -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
- name: taosdump normal table Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd debug | |
echo "TEST: normal table" | |
./build/bin/taosBenchmark -N -t 2 -n 10 -x -g -y > /dev/null | |
./build/bin/taosdump -D test -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: single normal table" | |
./build/bin/taosBenchmark -t 2 -n 2 -y > /dev/null | |
./build/bin/taosdump test d0 > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -gg > /dev/null | |
taos -s "select count(tbname) from test.meters" | grep "1 row" || exit $? | |
rm -rf *.sql *.avro* taosdump.* | |
- name: taosdump escape char Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd debug | |
echo "TEST: -n escape_char" | |
./build/bin/taosdump -n -D test > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -n -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: escaped tag" | |
taos -s "drop database test" | |
taos -s "create database test" | |
taos -s "create stable stb (ts timestamp, \`N\` int) tags(`T` int)" | |
taos -s "insert into test.tb using test.stb tags(0) values(now, 0)" | |
./build/bin/taosdump -D test > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -n -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: -L loose_mode" | |
./build/bin/taosdump -L -D test > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -L -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: complex with larger binary" | |
./build/bin/taosBenchmark -t 2 -n 10 -w 40 -b bool,tinyint,smallint,int,bigint,float,double,utinyint,usmallint,uint,ubigint,binary,nchar,timestamp -A bool,tinyint,smallint,int,bigint,float,double,utinyint,usmallint,uint,ubigint,binary,nchar,timestamp -y > /dev/null | |
./build/bin/taosdump -D test -gg > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -i . -gg > /dev/null | |
rm -rf *.sql *.avro* taosdump.* | |
- name: taosdump old format data Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd debug | |
echo "TEST: dump old format data in" | |
taos -s "drop database test" | |
tar xvJf ../example-data/example-data.tar.xz -C . | |
./build/bin/taosdump -i dump -gg | |
taos -s "select count(*) from test.meters" | grep 21 && echo "count 21 okay" || exit $? | |
rm -rf *.sql *.avro* taosdump.* | |
- name: taosdump WebSocket codec Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
export RUST_LOG=debug | |
cd debug | |
echo "TEST: simple and log database" | |
./build/bin/taosBenchmark -t 1 -n 1 -y | |
./build/bin/taosdump -R -D test -a -gg ||: | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: complex columns" | |
./build/bin/taosBenchmark -t 2 -n 10 -b bool,tinyint,smallint,int,bigint,float,double,utinyint,usmallint,uint,ubigint,binary,nchar,timestamp -A bool,tinyint,smallint,int,bigint,float,double,utinyint,usmallint,uint,ubigint,binary,nchar,timestamp -y > /dev/null | |
echo "TEST: whole db with snappy codec" | |
./build/bin/taosdump -R -D test -d snappy -gg > /dev/null ||: | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -d snappy -gg > /dev/null ||: | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: whole db with unknown codec" | |
./build/bin/taosBenchmark -t 2 -n 2 -y > /dev/null | |
./build/bin/taosdump -R -D test -d unknown -gg > /dev/null ||: | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -d unknown -gg > /dev/null ||: | |
taos -s "select count(*) from test.meters"|grep "4 |" && echo success ||: | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: single normal table with unknown codec" | |
./build/bin/taosdump test d0 -R -d unknown -gg > /dev/null ||: | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -d unknown -gg > /dev/null ||: | |
rm -rf *.sql *.avro* taosdump.* | |
- name: taosdump WebSocket normal table Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
export RUST_LOG=debug | |
cd debug | |
echo "TEST: normal table" | |
./build/bin/taosBenchmark -N -t 2 -n 10 -y > /dev/null | |
./build/bin/taosdump -R -D test -gg > /dev/null ||: | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -gg > /dev/null ||: | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: single normal table" | |
./build/bin/taosBenchmark -t 2 -n 2 -y > /dev/null | |
./build/bin/taosdump test d0 -R > /dev/null | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -gg > /dev/null | |
taos -s "select count(tbname) from test.meters" | grep "1 row" || exit 1 | |
rm -rf *.sql *.avro* taosdump.* | |
- name: taosdump WebSocket escape char Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
export RUST_LOG=debug | |
cd debug | |
echo "TEST: -n escape_char" | |
./build/bin/taosdump -R -n -D test -gg > /dev/null ||: | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -n -gg > /dev/null ||: | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: escaped tag" | |
taos -s "drop database test" | |
taos -s "create database test" | |
taos -s "create stable stb (ts timestamp, \`N\` int) tags(`T` int)" | |
taos -s "insert into test.tb using test.stb tags(0) values(now, 0)" | |
./build/bin/taosdump -R -D test -gg > /dev/null ||: | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -n -gg > /dev/null ||: | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: -L loose_mode" | |
./build/bin/taosdump -R -L -D test -gg > /dev/null ||: | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -L -gg > /dev/null ||: | |
rm -rf *.sql *.avro* taosdump.* | |
echo "TEST: complex with larger binary" | |
./build/bin/taosBenchmark -t 2 -n 10 -w 40 -b bool,tinyint,smallint,int,bigint,float,double,utinyint,usmallint,uint,ubigint,binary,nchar,timestamp -A bool,tinyint,smallint,int,bigint,float,double,utinyint,usmallint,uint,ubigint,binary,nchar,timestamp -y > /dev/null | |
./build/bin/taosdump -R -D test -gg > /dev/null ||: | |
taos -s "drop database test" | |
./build/bin/taosdump -R -i . -gg > /dev/null ||: | |
rm -rf *.sql *.avro* taosdump.* | |
- name: taosdump old format data Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd debug | |
echo "TEST: dump old format data in" | |
taos -s "drop database test" | |
tar xvJf ../example-data/example-data.tar.xz -C . | |
./build/bin/taosdump -i dump -gg | |
rm -rf *.sql *.avro* taosdump.* | |
- name: Old Test cases | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
cd tests | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
echo "TEST: old cases" | |
python3 ./test.py -f taosdump/old/taosdumpTest.py > /dev/null | |
python3 ./test.py -f taosdump/old/taosdumpTest2.py > /dev/null | |
python3 ./test.py -f taosdump/old/taosdumpTestNanoSupport.py > /dev/null | |
#python3 test.py -f query/nestedQuery/nestedQuery.py > /dev/null | |
#python3 test.py -f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py > /dev/null | |
- name: taosdump native Develop Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
cd tests | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
echo "TEST: develop test cases" | |
if find taosdump/native -name "*.py"|grep -q .; | |
then | |
for i in `find taosdump/native -name "*.py"|sort`; do python3 ./test.py -f $i > /dev/null && echo -e "\033[32m $i success! \033[0m"|| echo -e "\033[31m $i failed! \033[0m" ;done | |
fi | |
- name: taosdump WebSocket Develop Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
nohup taosadapter > /dev/null & | |
nohup sudo TAOS_SUPPORT_VNODES=256 taosd > /dev/null & | |
sleep 10 | |
cd tests | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
if find taosdump/ws3 -name "*.py"|grep -q .; | |
then | |
for i in `find taosdump/ws3 -name "*.py"|sort`; do python3 ./test.py -f $i > /dev/null && echo -e "\033[32m develop-test/$i success! \033[0m"|| echo -e "\033[31m develop-test/$i failed! \033[0m" | tee -a ~/taosdump-failed.txt ;done | |
fi | |
- name: taosdump System Test cases | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
cd tests | |
echo "TEST: system test cases" | |
if find taosdump/system-test -name "*.py"|grep -q .; | |
then | |
for i in `find taosdump/system-test -name "*.py"|sort`; do python3 ./test.py -f $i > /dev/null && echo -e "\033[32m $i success! \033[0m"|| echo -e "\033[31m $i failed! \033[0m" ;done | |
fi | |
- name: taosBenchmark native Test cases | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
sudo pkill -9 taosadapter || : | |
sudo pkill -9 taosd || : | |
sleep 5 | |
cd tests | |
echo "TEST: taosBenchmark develop test cases" | |
if find taosbenchmark -name "*.py"|grep -q .; | |
then | |
for i in `find taosbenchmark -name "*.py"|grep -Ev "v2|websocket|taosdemo|kill-slow-query"|sort`; do printf $i && python3 ./test.py -f $i > /dev/null && echo -e " \033[32m $i success! \033[0m"|| echo -e " \033[31m $i failed! \033[0m"; done | |
fi | |
- name: taosBenchmakr WebSocket Test cases | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
cd tests | |
if find taosbenchmark/ws -name "*.py"|grep -q .; | |
then | |
for i in `find taosbenchmark/ws -name "*.py"`; \ | |
do printf $i && python3 ./test.py -f $i > /dev/null \ | |
&& echo -e " \033[32m $i success! \033[0m" \ | |
|| echo -e " \033[31m $i failed! \033[0m" ; \ | |
done | |
fi | |
- name: taosdemo query Test | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
cd tests | |
if find taosbenchmark -name "taosdemo*.py"|grep -q .; | |
then | |
for i in `find taosbenchmark -name "taosdemo*.py"`; do printf $i && python3 ./test.py -f $i && echo -e " \033[32m $i success! \033[0m"|| echo -e " \033[31m $i failed! \033[0m" ;done | |
fi | |
- name: Generate report | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
run: | | |
topdir=`pwd` | |
cd debug | |
gcov -abcfu ${topdir}/taos-tools/src/taosdump.c -o src/CMakeFiles/taosdump.dir/taosdump.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchMain.c -o src/CMakeFiles/taosBenchmark.dir/benchMain.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchCommandOpt.c -o src/CMakeFiles/taosBenchmark.dir/benchCommandOpt.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchData.c -o src/CMakeFiles/taosBenchmark.dir/benchData.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchInsert.c -o src/CMakeFiles/taosBenchmark.dir/benchInsert.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchJsonOpt.c -o src/CMakeFiles/taosBenchmark.dir/benchJsonOpt.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchOutput.c -o src/CMakeFiles/taosBenchmark.dir/benchOutput.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchQuery.c -o src/CMakeFiles/taosBenchmark.dir/benchQuery.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchTmq.c -o src/CMakeFiles/taosBenchmark.dir/benchTmq.c.gcno | |
gcov -abcfu ${topdir}/taos-tools/src/benchUtil.c -o src/CMakeFiles/taosBenchmark.dir/benchUtil.c.gcno | |
mkdir ${topdir}/coverage || : | |
lcov -c -d . -o ${topdir}/coverage/lcov-with-deps.info | |
lcov -r ${topdir}/coverage/lcov-with-deps.info "*/deps/*" -o ${topdir}/coverage/lcov.info | |
lcov -r ${topdir}/coverage/lcov-with-deps.info "*/src/tools*" -o ${topdir}/coverage/lcov.info | |
- name: Publish to coveralls.io | |
if: | |
(steps.changed-files-specific.outputs.any_changed == 'true' | |
&& github.event_name == 'pull_request') | |
|| github.event_name == 'push' | |
|| github.event_name == 'schedule' | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |