diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 841966d..cf4d897 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,8 +37,10 @@ jobs: - name: Setup run: docker-compose up -d - - name: Startup - run: sudo ./docker/wait.sh + - name: Wait for MSSQL + uses: jakejarvis/wait-action@master + with: + time: '10s' - name: Restore shell: pwsh diff --git a/docker/wait.sh b/docker/wait.sh deleted file mode 100644 index 91e7db4..0000000 --- a/docker/wait.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# wait for MSSQL server to start -export STATUS=1 -i=0 - -while [[ $STATUS -ne 0 ]] && [[ $i -lt 30 ]]; do - i=$i+1 - /opt/mssql-tools/bin/sqlcmd -t 1 -S localhost -U sa -P "Password12!" -Q "SELECT 1" >> /dev/null - STATUS=$? -done - -if [ $STATUS -ne 0 ]; then - echo "Error: MSSQL took more than thirty seconds to start up." - exit 1 -fi - -echo "MSSQL started!"