feat: tmq supports token (#385) #268
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: taos-ws-py-compatibility | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "3.0" | |
| tags: | |
| - taos-ws-py-v* | |
| pull_request: | |
| branches: | |
| - "main" | |
| - "3.0" | |
| env: | |
| PYTHON_VERSION: "3.10" | |
| jobs: | |
| rebuild: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| status: ${{ steps.set-output.outputs.rebuild }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect file changes for rebuild | |
| if: "!startsWith(github.ref, 'refs/tags/taos-ws-py')" | |
| id: detect-changes | |
| uses: tj-actions/changed-files@v46 | |
| with: | |
| files: | | |
| .github/workflows/taos-ws-py*.yml | |
| taos-ws-py/** | |
| - name: Set rebuild status | |
| id: set-output | |
| run: | | |
| if [[ "${GITHUB_REF}" == refs/tags/taos-ws-py* ]]; then | |
| echo "rebuild=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "rebuild=${{ steps.detect-changes.outputs.any_changed }}" >> $GITHUB_OUTPUT | |
| fi | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: rebuild | |
| if: needs.rebuild.outputs.status == 'true' | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| target: [x86_64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "${{ env.PYTHON_VERSION }}" | |
| architecture: x64 | |
| - name: Get CMake | |
| uses: lukka/get-cmake@latest | |
| with: | |
| cmakeVersion: 3.31.6 | |
| - name: Build taos-ws-py wheel | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| rust-toolchain: stable | |
| target: ${{ matrix.target }} | |
| working-directory: taos-ws-py | |
| manylinux: auto | |
| args: --release --strip | |
| - name: Install taos-ws-py wheel | |
| run: pip install taos-ws-py --no-index --force-reinstall --find-links taos-ws-py/target/wheels | |
| - name: Get TDengine | |
| run: wget https://github.com/taosdata/TDengine/releases/download/ver-3.3.6.0/TDengine-server-3.3.6.0-Linux-x64.tar.gz | |
| - name: Install TDengine | |
| run: | | |
| tar -zxf TDengine-server-3.3.6.0-Linux-x64.tar.gz | |
| rm -rf TDengine-server-3.3.6.0-Linux-x64.tar.gz | |
| cd TDengine-server-3.3.6.0 | |
| sudo ./install.sh -e no | |
| - name: Copy taos.cfg | |
| run: | | |
| sudo mkdir -p /etc/taos | |
| sudo cp ./.github/workflows/taos.cfg /etc/taos/taos.cfg | |
| - name: Set timezone | |
| run: sudo timedatectl set-timezone Asia/Shanghai | |
| - name: Start TDengine | |
| run: | | |
| taosd & | |
| taosadapter & | |
| - name: Run tests | |
| env: | |
| TDENGINE_URL: localhost:6041 | |
| TDENGINE_TEST_USERNAME: ${{ secrets.WS_TDENGINE_TEST_USERNAME }} | |
| TDENGINE_TEST_PASSWORD: ${{ secrets.WS_TDENGINE_TEST_PASSWORD }} | |
| WS_CLOUD_URL: ${{ secrets.WS_CLOUD_URL }} | |
| WS_CLOUD_TOKEN: ${{ secrets.WS_CLOUD_TOKEN }} | |
| TEST_TD_3360: "true" | |
| run: | | |
| pip3 install pytest toml | |
| pytest ./taos-ws-py/tests/ |