fix(ws): fix dsn token param issue #182
Workflow file for this run
This file contains hidden or 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: Build | |
on: | |
push: | |
branches: | |
- 'main' | |
- '3.0' | |
pull_request: | |
branches: | |
- 'main' | |
- '3.0' | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get CMake | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: 3.31.6 | |
- name: Build tools | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y build-essential libgeos-dev | |
- name: Setup Python | |
run: | | |
sudo apt-get install -y python3 python3-pip python-is-python3 | |
- name: Cache Poetry | |
id: cache-poetry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.poetry | |
key: ubuntu-22.04-poetry | |
#---------------------------------------------- | |
# ----- install & configure poetry ----- | |
#---------------------------------------------- | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.5 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
#---------------------------------------------- | |
# load cached venv if cache exists | |
#---------------------------------------------- | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
#---------------------------------------------- | |
# install dependencies if cache does not exist | |
#---------------------------------------------- | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: | | |
poetry install --no-interaction --no-root | |
poetry run pip install "numpy<2.0.0" | |
#---------------------------------------------- | |
# install your root project, if required | |
#---------------------------------------------- | |
- name: Install library | |
run: | | |
poetry install --no-interaction --with=test | |
poetry run pip install "numpy<2.0.0" | |
- name: Get CMake | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: 3.31.6 | |
- name: Determine TDengine branch | |
uses: haya14busa/action-cond@v1 | |
id: determine-branch | |
with: | |
cond: ${{ github.base_ref == 'main' }} | |
if_true: '3.3.6' | |
if_false: '3.0' | |
- name: Checkout tdengine | |
uses: actions/checkout@v2 | |
with: | |
repository: "taosdata/TDengine" | |
path: "TDengine_v3" | |
ref: ${{ steps.determine-branch.outputs.value }} | |
- name: Build TDengine 3.0 | |
run: | | |
pwd | |
git branch -vv | |
cd TDengine_v3 | |
rm build -rf | |
mkdir build | |
cd build | |
cmake ../ -DBUILD_JDBC=false -DCMAKE_INSTALL_PREFIX:PATH=`realpath ../../local/` -DBUILD_HTTP=false -DBUILD_DEPENDENCY_TESTS=false | |
make -j14 | |
sudo make install | |
ls -alh /etc/taos/ | |
cd ../../ | |
- name: Start TDengine 3.0 | |
run: | | |
tree TDengine_v3/build/build/ | |
export C_INCLUDE_PATH=$PWD/TDengine_v3/build/build/bin | |
export LD_LIBRARY_PATH=$PWD/TDengine_v3/build/build/lib | |
mkdir -p /tmp/taos/v3/log /tmp/taos/v3/data | |
printf "dataDir /tmp/taos/v3/data\nlogDir /tmp/taos/v3/log\ndebugFlag 135\n" |sudo tee /etc/taos/taos.cfg | |
TAOS_SUPPORT_VNODES=256 ./TDengine_v3/build/build/bin/taosd & | |
./TDengine_v3/build/build/bin/taosadapter & | |
#---------------------------------------------- | |
# run test suite | |
#---------------------------------------------- | |
- name: Test 3.0 | |
run: | | |
export LD_LIBRARY_PATH=$PWD/TDengine_v3/build/build/lib | |
#source $VENV | |
export TDENGINE_URL=localhost:6041 | |
curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" localhost:6041/rest/sql | |
poetry run pytest --cov-report term --cov-report html --cov-report xml --cov=taos --cov=taosrest --cov-append tests | |
- name: 'Upload taosd logs' | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: log-v3-taosd | |
path: /tmp/taos/v3/log/ | |
retention-days: 1 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Build Artifacts | |
run: | | |
poetry build |