@@ -49,15 +49,36 @@ jobs:
4949 name : test-image
5050 path : image.tar
5151
52+ check-secrets :
53+ runs-on : ubuntu-latest
54+ outputs :
55+ mssql-available : ${{ steps.check-mssql.outputs.defined }}
56+ steps :
57+ - id : check-mssql
58+ env :
59+ MSSQL_VECTOR_REGISTRY : ${{ secrets.MSSQL_VECTOR_REGISTRY }}
60+ run : |
61+ if [[ -n "$MSSQL_VECTOR_REGISTRY" ]]; then
62+ echo "::set-output name=defined::true"
63+ else
64+ echo "::set-output name=defined::false"
65+ fi
66+
5267 test :
5368 needs : [lint, build]
5469 runs-on : ubuntu-latest
5570 strategy :
5671 fail-fast : false
5772 matrix :
58- db : [pgvector, redis, elastic, qdrant]
73+ db : [pgvector, redis, elastic, qdrant, mssql ]
5974
6075 steps :
76+ - name : Early skip MSSQL if secrets unavailable
77+ if : matrix.db == 'mssql' && needs.check-secrets.outputs.mssql-available != 'true'
78+ run : |
79+ echo "Skipping MSSQL test: secrets missing."
80+ exit 78
81+
6182 - uses : actions/checkout@v4
6283
6384 - name : Download image artifact
6990 - name : Load Docker image
7091 run : docker load -i image.tar
7192
93+ - name : Log in to registry for SQL-vector preview
94+ if : matrix.db == 'mssql'
95+ uses : docker/login-action@v3
96+ with :
97+ registry : ${{ secrets.MSSQL_VECTOR_REGISTRY }}
98+ username : ${{ secrets.MSSQL_VECTOR_USERNAME }}
99+ password : ${{ secrets.MSSQL_VECTOR_PASSWORD }}
100+
101+ - name : Pull preview SQL Server-vector image
102+ if : matrix.db == 'mssql'
103+ run : |
104+ docker pull ${{ secrets.MSSQL_VECTOR_REGISTRY }}/mssql-sql2025-ctp1-3-release/mssql-server-rhel9:17.0.400.5_4
105+
106+ - name : Start SQL Server-vector
107+ if : matrix.db == 'mssql'
108+ run : |
109+ docker run -d --name mssql-vector-test \
110+ -e ACCEPT_EULA=Y \
111+ -e MSSQL_SA_PASSWORD=StrongPreviewPass1! \
112+ -p 1433:1433 \
113+ ${{ secrets.MSSQL_VECTOR_REGISTRY }}/mssql-sql2025-ctp1-3-release/mssql-server-rhel9:17.0.400.5_4
114+
72115 - name : Start PGVector
73116 if : matrix.db == 'pgvector'
74117 run : |
@@ -115,7 +158,7 @@ jobs:
115158 test-image:${{ needs.build.outputs.image_tag }}
116159
117160 release :
118- if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
161+ if : ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && github.event.repository.fork == false
119162 runs-on : ubuntu-latest
120163 needs : [lint, build, test]
121164 steps :
0 commit comments