Skip to content

Commit

Permalink
Use docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
RealOrangeOne committed Oct 14, 2024
1 parent 1f90482 commit 5fca86b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Python dependencies
run: pip install -r dev-requirements.txt
- name: Fetch containers
run: docker-compose build && docker-compose pull
run: docker compose build && docker compose pull
- name: Run test
run: ./scripts/test.sh

Expand Down
8 changes: 4 additions & 4 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ set -e
export PATH=env/bin:${PATH}

echo "> Start all containers..."
docker-compose up -d
docker compose up -d

echo "> Await postgres..."
until docker-compose exec -T psql pg_isready -U postgres
until docker compose exec -T psql pg_isready -U postgres
do
sleep 1
done

echo "> Await mysql..."
until docker-compose exec -T mysql bash -c 'mysqladmin ping --protocol tcp -p$MYSQL_ROOT_PASSWORD'
until docker compose exec -T mysql bash -c 'mysqladmin ping --protocol tcp -p$MYSQL_ROOT_PASSWORD'
do
sleep 3
done

pytest -v

echo "> Clean up..."
docker-compose down -t 3
docker compose down -t 3

0 comments on commit 5fca86b

Please sign in to comment.