Skip to content

Commit 66432da

Browse files
committed
Rename environment to test-coverage-trials
1 parent 8b92e52 commit 66432da

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

.github/workflows/test-coverage.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
test:
1515
name: Run tests and collect coverage
1616
runs-on: ubuntu-22.04
17-
environment: test-coverage
17+
environment: test-coverage-trials
1818

1919
services:
2020
mssql:
@@ -27,7 +27,7 @@ jobs:
2727
MSSQL_PID: Developer
2828
MSSQL_MEMORY_LIMIT_MB: 4096
2929
options: >-
30-
--health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P '${SA_PASSWORD}' -Q 'SELECT 1' || exit 1"
30+
--health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'TestP@ssw0rd123!' -Q 'SELECT 1' || exit 1"
3131
--health-interval 10s
3232
--health-timeout 300s
3333
--health-retries 5
@@ -43,7 +43,7 @@ jobs:
4343
options: >-
4444
--health-cmd "pg_isready -U postgres -d testdb"
4545
--health-interval 10s
46-
--health-timeout 5s
46+
--health-timeout 10s
4747
--health-retries 5
4848
4949
steps:
@@ -58,21 +58,16 @@ jobs:
5858
docker exec mssql chmod -R 777 /var/opt/mssql/data
5959
if: always()
6060

61-
- name: Start MSSQL container
61+
- name: Wait for services to be ready
6262
run: |
63-
for i in {1..30}; do
64-
nc -zv localhost 1433 && echo "PostgreSQL is up" && break
65-
echo "Waiting for MSSQL to start..."
66-
sleep 5
67-
done
68-
shell: bash
69-
70-
- name: Start PostgreSQL container
71-
run: |
72-
for i in {1..30}; do
73-
nc -zv localhost 5432 && echo "PostgreSQL is up" && break
74-
sleep 5
63+
echo "Waiting for MSSQL to be ready..."
64+
for i in {1..30}; do
65+
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'TestP@ssw0rd123!' -Q "SELECT 1" && break
66+
sleep 2
7567
done
68+
69+
echo "Waiting for PostgreSQL to be ready..."
70+
until pg_isready -h localhost -p 5432 -U postgres; do sleep 2; done
7671
shell: bash
7772

7873
- name: Set up Conda

0 commit comments

Comments
 (0)