Skip to content

Commit

Permalink
revert: "chore: don't run database container with docker compose"
Browse files Browse the repository at this point in the history
This reverts commit 465d6fd.

Relate to #13
  • Loading branch information
php-coder committed Mar 27, 2024
1 parent eaaa90d commit 3dcbec8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,20 @@ jobs:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-adding-configurations
include:
# "docker-service-name" must match "services.$name" from docker-compose.yaml
# "database-service-name" must match "services.$name" from docker-compose.yaml
# "application-port" must match "services.$name.environment:PORT" from docker-compose.yaml
- docker-service-name: 'express-js'
database-service-name: 'mysql'
application-port: 3010
- docker-service-name: 'express-ts'
database-service-name: 'mysql'
application-port: 3020
- docker-service-name: 'chi'
database-service-name: 'mysql'
application-port: 3030
env:
# Prevent interference between builds by setting the project name to a unique value. Otherwise
# "docker compose down" has been stopping containers from other builds.
# "docker compose down" has been stopping containers (especially database) from other builds.
# https://docs.docker.com/compose/project-name/
# https://docs.docker.com/compose/environment-variables/envvars/#compose_project_name
COMPOSE_PROJECT_NAME: ${{ matrix.docker-service-name }}
Expand Down Expand Up @@ -74,7 +78,6 @@ jobs:
--detach \
--wait \
--quiet-pull \
--no-deps \
${{ matrix.docker-service-name }}
- name: Show container statuses
Expand All @@ -100,6 +103,15 @@ jobs:
--timestamps \
${{ matrix.docker-service-name }} | tee ../tests-reports/application-logs.txt
- name: Save database logs
if: failure()
working-directory: docker
run: >-
docker compose logs \
--no-log-prefix \
--timestamps \
${{ matrix.database-service-name }} | tee ../test-reports/database-logs.txt
- name: Save report
if: failure()
uses: actions/[email protected] # https://github.com/actions/upload-artifact
Expand Down

0 comments on commit 3dcbec8

Please sign in to comment.