Add VECTOR and BSON data types support #82
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: SingleStore .NET Connector | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: [master] | |
| tags: | |
| - 'v*' | |
| workflow_call: | |
| workflow_dispatch: | |
| env: | |
| DOTNET_VERSION: 10.0.x | |
| TARGET_FRAMEWORK: net10.0 | |
| CONNECTOR_VERSION: 1.4.0 | |
| LICENSE_KEY: ${{ secrets.LICENSE_KEY }} | |
| SQL_USER_PASSWORD: ${{ secrets.SQL_USER_PASSWORD }} | |
| S2MS_API_KEY: ${{ secrets.S2MS_API_KEY }} | |
| jobs: | |
| fetch-s2-versions: | |
| name: Fetch SingleStore supported versions | |
| runs-on: ubuntu-latest | |
| outputs: | |
| versions: ${{ steps.get_versions.outputs.versions }} | |
| steps: | |
| - name: Get supported versions of SingleStore | |
| id: get_versions | |
| uses: singlestore-labs/singlestore-supported-versions@main | |
| with: | |
| include_rc: true | |
| build-matrix: | |
| name: Build test matrix | |
| runs-on: ubuntu-latest | |
| needs: fetch-s2-versions | |
| outputs: | |
| matrix: ${{ steps.compose.outputs.matrix }} | |
| steps: | |
| - name: Install jq | |
| run: sudo apt-get update && sudo apt-get install -y jq | |
| - name: Compose matrix JSON | |
| id: compose | |
| env: | |
| VERSIONS: ${{ needs.fetch-s2-versions.outputs.versions }} | |
| run: | | |
| rows=$(jq -cn --argjson versions "$VERSIONS" ' | |
| $versions | map({ | |
| name: ("SingleStore " + . + " tests"), | |
| singlestore_version: (.) | |
| }) | |
| ') | |
| matrix=$(jq -cn --argjson rows "$rows" '{ include: $rows }') | |
| echo "matrix=$matrix" >> "$GITHUB_OUTPUT" | |
| test-ubuntu: | |
| name: ${{ matrix.name }} | |
| needs: build-matrix | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Remove unnecessary pre-installed toolchains for free disk spaces | |
| run: | | |
| echo "=== BEFORE ===" | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /usr/local/share/boost | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /opt/hostedtoolcache/CodeQL | |
| sudo rm -rf /opt/hostedtoolcache/Ruby | |
| sudo rm -rf /opt/hostedtoolcache/Go | |
| docker system prune -af || true | |
| sudo apt-get clean | |
| echo "=== AFTER ===" | |
| df -h | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y mariadb-client-core | |
| sudo apt-get install -y mariadb-client | |
| sudo apt-get update | |
| dotnet --info | |
| - name: Start SingleStore Cluster | |
| run: ./.github/workflows/setup_cluster.sh | |
| env: | |
| SINGLESTORE_VERSION: ${{ matrix.singlestore_version }} | |
| - name: Build connector | |
| run: dotnet build -c Release | |
| - name: Copy config file for SideBySide tests | |
| run: | | |
| cp ./.github/workflows/SideBySide/config-ssl.json tests/SideBySide/config.json | |
| sed -i "s|SINGLESTORE_HOST|127.0.0.1|g" tests/SideBySide/config.json | |
| sed -i "s|SQL_USER_PASSWORD|${SQL_USER_PASSWORD}|g" tests/SideBySide/config.json | |
| sed -i "s|SQL_USER_NAME|root|g" tests/SideBySide/config.json | |
| mkdir -p /home/runner/work/SingleStoreNETConnector/SingleStoreNETConnector/artifacts/bin/SideBySide/release_${{ env.TARGET_FRAMEWORK }}/ | |
| cp tests/SideBySide/config.json /home/runner/work/SingleStoreNETConnector/SingleStoreNETConnector/artifacts/bin/SideBySide/release_${{ env.TARGET_FRAMEWORK }}/config.json | |
| - name: Run Unit tests | |
| run: | | |
| cd tests/SingleStoreConnector.Tests | |
| dotnet test -f ${{ env.TARGET_FRAMEWORK }} -c Release --no-build | |
| cd ../../ | |
| - name: Run Conformance tests | |
| run: | | |
| cd tests/Conformance.Tests | |
| dotnet test -f ${{ env.TARGET_FRAMEWORK }} -c Release --no-build | |
| cd ../../ | |
| - name: Run DependencyInjection tests | |
| run: | | |
| cd tests/SingleStoreConnector.DependencyInjection.Tests | |
| dotnet test -f ${{ env.TARGET_FRAMEWORK }} -c Release --no-build | |
| cd ../../ | |
| - name: Run NativeAot tests | |
| run: | | |
| cd tests/SingleStoreConnector.NativeAot.Tests | |
| dotnet run -f ${{ env.TARGET_FRAMEWORK }} -c Release | |
| cd ../../ | |
| - name: Run SideBySide tests | |
| run: | | |
| cd tests/SideBySide | |
| dotnet test -f ${{ env.TARGET_FRAMEWORK }} -c Release --no-build | |
| cd ../../ | |
| test-windows: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Python dependencies | |
| run: pip install singlestoredb | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Build project binaries | |
| run: dotnet build -c Release | |
| - name: Start SingleStore for SideBySide tests | |
| run: python .github\workflows\s2ms_cluster.py start singlestoretest | |
| - name: Fill test config | |
| run: python .github\workflows\fill_test_config.py | |
| - name: Export full connection string | |
| shell: bash | |
| run: echo "CONNECTION_STRING=$(< $HOME/CONNECTION_STRING)" >> $GITHUB_ENV | |
| - name: Run Unit tests | |
| run: .\.github\workflows\run-test-windows.ps1 -test_block SingleStoreConnector.Tests -target_framework ${{ env.TARGET_FRAMEWORK }} | |
| - name: Run Conformance tests | |
| run: .\.github\workflows\run-test-windows.ps1 -test_block Conformance.Tests -target_framework ${{ env.TARGET_FRAMEWORK }} | |
| - name: Run DependencyInjection tests | |
| run: .\.github\workflows\run-test-windows.ps1 -test_block SingleStoreConnector.DependencyInjection.Tests -target_framework ${{ env.TARGET_FRAMEWORK }} | |
| - name: Run NativeAot tests | |
| run: dotnet run --project tests/SingleStoreConnector.NativeAot.Tests --framework ${{ env.TARGET_FRAMEWORK }} --configuration Release | |
| - name: Run SideBySide tests | |
| run: .\.github\workflows\run-test-windows.ps1 -test_block SideBySide -target_framework ${{ env.TARGET_FRAMEWORK }} | |
| - name: Terminate test cluster | |
| if: always() | |
| run: python .github\workflows\s2ms_cluster.py terminate | |
| publish: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Build project binaries | |
| run: dotnet build -c Release | |
| - name: Create CI Artifacts directory | |
| run: mkdir net_connector | |
| - name: Build NuGet package | |
| run: dotnet pack -c Release --output net_connector -p:PackageVersion=${{ env.CONNECTOR_VERSION }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: net_connector | |
| path: net_connector/ | |