Skip to content

release: bump version to 3.1.9 (#124) #101

release: bump version to 3.1.9 (#124)

release: bump version to 3.1.9 (#124) #101

name: compatibility-3360
on:
pull_request:
branches:
- 'main'
- '3.0'
push:
branches:
- 'main'
- '3.0'
workflow_dispatch:
jobs:
test_unit:
runs-on: ubuntu-22.04
strategy:
matrix:
dotnet: [ '3.1.x', '5.0.x', '6.0.x','7.0.x','8.0.x','9.0.x' ]
include:
- dotnet: '3.1.x'
tfm: 'netcoreapp3.1'
- dotnet: '5.0.x'
tfm: 'net5'
- dotnet: '6.0.x'
tfm: 'net6'
- dotnet: '7.0.x'
tfm: 'net7'
- dotnet: '8.0.x'
tfm: 'net8'
- dotnet: '9.0.x'
tfm: 'net9'
name: test unit ${{ matrix.dotnet }}
steps:
- 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
run: |
tar -zxf TDengine-server-3.3.6.0-Linux-x64.tar.gz
cd TDengine-server-3.3.6.0
sudo ./install.sh -e no
- name: checkout
uses: actions/checkout@v4
- name: copy taos cfg
run: |
sudo mkdir -p /etc/taos
sudo cp ./.github/workflows/taos.cfg /etc/taos/taos.cfg
sudo cp ./.github/workflows/taosadapter.toml /etc/taos/taosadapter.toml
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore dependencies
run: |
ls -al
dotnet restore
- name: start shell
run: |
cat >start.sh<<EOF
ulimit -n 65535 && TAOS_SUPPORT_VNODES=256 taosd
EOF
- name: start taosd
run: nohup sudo sh ./start.sh &
- name: start taosadapter
run: sudo taosadapter &
- name: test
id: test
env:
TDENGINE_CLOUD_ENDPOINT: ${{ secrets.TDENGINE_CLOUD_ENDPOINT }}
TDENGINE_CLOUD_TOKEN: ${{ secrets.TDENGINE_CLOUD_TOKEN }}
TD_3360_TEST: 'true'
run: |
dotnet test -f ${{ matrix.tfm }} --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --results-directory:./testresults
timeout-minutes: 15
- uses: actions/upload-artifact@v4
if: always() && (steps.test.outcome == 'failure' || steps.test.outcome == 'cancelled')
with:
name: ${{ runner.os }}-${{ matrix.dotnet }}-log
path: /var/log/taos/
test_windows:
runs-on: windows-latest
strategy:
matrix:
dotnet: [ '3.1.x', '5.0.x', '6.0.x','7.0.x','8.0.x','9.0.x' ]
include:
- dotnet: '3.1.x'
tfm: 'netcoreapp3.1'
- dotnet: '5.0.x'
tfm: 'net5'
- dotnet: '6.0.x'
tfm: 'net6'
- dotnet: '7.0.x'
tfm: 'net7'
- dotnet: '8.0.x'
tfm: 'net8'
- dotnet: '9.0.x'
tfm: 'net9'
- dotnet: ''
tfm: 'net46'
name: test windows unit ${{ matrix.tfm }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: cache package
id: cache-package
uses: actions/cache@v4
with:
path: tdengine.exe
key: tdengine-3360-windows
- name: Download TDengine
if: steps.cache-package.outputs.cache-hit != 'true'
run: |
$url = "${{ secrets.TD_3360_WINDOWS_URL }}"
Invoke-WebRequest -Uri $url -OutFile tdengine.exe
- name: Install TDengine
run: |
if (Test-Path -Path "tdengine.exe") {
Write-Host "Installing TDengine..."
Start-Process -FilePath "tdengine.exe" -ArgumentList "/silent" -Wait
} else {
Write-Host "TDengine installer not found."
exit 1
}
- name: Verify TDengine installation
run: |
$taosdPath = "C:\TDengine\taosd.exe"
if (Test-Path -Path $taosdPath) {
Write-Host "TDengine installed successfully."
& $taosdPath -V
} else {
Write-Host "TDengine installation failed."
exit 1
}
- name: copy taos cfg
run: |
cp .\.github\workflows\taos.cfg C:\TDengine\cfg\taos.cfg
cp .\.github\workflows\taosadapter.toml C:\TDengine\cfg\taosadapter.toml
- name: Start TDengine service
run: |
$serviceName = "taosd"
$taosadapterServiceName = "taosadapter"
if (Get-Service -Name $serviceName -ErrorAction SilentlyContinue) {
Start-Service -Name $serviceName
Write-Host "TDengine service started."
} else {
Write-Host "TDengine service not found."
exit 1
}
if (Get-Service -Name $taosadapterServiceName -ErrorAction SilentlyContinue) {
Start-Service -Name $taosadapterServiceName
Write-Host "taosAdapter service started."
} else {
Write-Host "TDengine service not found."
exit 1
}
- name: Check TDengine status
run: |
$taosPath = "C:\TDengine\taos.exe"
& $taosPath -Z 0 -s "show databases"
& $taosPath -Z 1 -s "show databases"
- name: Setup dotnet
uses: actions/setup-dotnet@v4
if: matrix.dotnet != ''
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore dependencies
run: |
ls
dotnet restore
- name: test
id: test
env:
TDENGINE_CLOUD_ENDPOINT: ${{ secrets.TDENGINE_CLOUD_ENDPOINT }}
TDENGINE_CLOUD_TOKEN: ${{ secrets.TDENGINE_CLOUD_TOKEN }}
TD_3360_TEST: 'true'
run: |
dotnet test -f ${{ matrix.tfm }} --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" --results-directory:./testresults
timeout-minutes: 15
- name: get coverage files
id: get_coverage_files
run: |
$coverageFiles = Get-ChildItem -Path ./testresults -Recurse -Filter "coverage.cobertura.xml" | ForEach-Object { $_.FullName }
$coverageFilesString = $coverageFiles -join ";"
echo "files=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "files=${COVERAGE_FILES}" >> $Env:GITHUB_OUTPUT
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ${{ steps.get_coverage_files.outputs.files }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}