Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
MarhiievHE committed Dec 31, 2023
1 parent 6152303 commit b29e17f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,28 @@ jobs:
- uses: actions/checkout@v3

- name: Install PostgreSQL and Redis (on MacOS)
if: runner.os == 'macos'
if: runner.os == 'macOS'
run: |
# brew install postgresql
brew install redis
brew services start postgresql
brew services start redis
- name: Check services status (on MacOS)
if: runner.os == 'macos'
if: runner.os == 'macOS'
run: |
# until brew services list | grep -E 'postgresql[[:space:]]+started' && brew services list | grep -E 'redis[[:space:]]+started'; do sleep 5; done
until pg_isready -h localhost -p 5432 && redis-cli ping; do sleep 5; done
- name: Set up PostgreSQL (on MacOS)
if: runner.os == 'macos'
if: runner.os == 'macOS'
run: |
createuser -s postgres
cd database
bash setup.sh
- name: Setup pg (on Windows)
if: runner.os == 'windows'
if: runner.os == 'Windows'
run: |
echo "unix_socket_directories = ''" >> "$PGDATA/postgresql.conf"
echo "port = 5432" >> "$PGDATA/postgresql.conf"
Expand All @@ -58,7 +58,7 @@ jobs:
bash setup.sh
- name: Setup redis (on Windows)
if: runner.os == 'windows'
if: runner.os == 'Windows'
run: |
$URL = "https://github.com/redis-windows/redis-windows/releases/download/7.0.14/Redis-7.0.14-Windows-x64-with-Service.tar.gz"
$outputFolder = "C:\redis"
Expand All @@ -82,14 +82,14 @@ jobs:
net start Redis
- name: Start docker containers
if: runner.os == 'ubuntu'
if: runner.os == 'Linux'
run: |
docker-compose -f test-docker-compose.yml up -d pg-example redis-example
# sleep 15 # wait for database to be ready
# docker ps
- name: Wait for PostgreSQL to become healthy
if: runner.os == 'ubuntu'
if: runner.os == 'Linux'
run: |
while [[ "$(docker inspect --format='{{.State.Health.Status}}' pg-example)" != "healthy" ]]; do
echo "Waiting for PostgreSQL container to become healthy..."
Expand All @@ -98,7 +98,7 @@ jobs:
timeout-minutes: 5

- name: Wait for Redis to become healthy
if: runner.os == 'ubuntu'
if: runner.os == 'Linux'
run: |
while [[ "$(docker inspect --format='{{.State.Health.Status}}' redis-example)" != "healthy" ]]; do
echo "Waiting for Redis container to become healthy..."
Expand All @@ -125,5 +125,5 @@ jobs:
MODE: test

- name: Stop containers
if: runner.os == 'ubuntu'
if: runner.os == 'Linux'
run: docker-compose down

0 comments on commit b29e17f

Please sign in to comment.