Skip to content

Commit

Permalink
Testing docker compose in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Minituff committed Oct 22, 2023
1 parent e4e08a3 commit b2e5ea6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,8 @@ jobs:
# docker run --rm "${{ fromJSON(steps.meta.outputs.json).tags[0] }}-test"
run: |
cd tests
docker run --rm minituff/nautical-backup:test \
--name nautical-backup \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /source:/app/source \
-v /destination:/app/destination \
-e LOG_LEVEL="INFO" \
-e EXIT_AFTER_INIT="true" \
-e BACKUP_ON_START="true" \
--build-arg="NAUTICAL_VERSION="test"
docker compose up
# This step uses the docker/build-push-action action to build the image, based on your repository's Dockerfile.
# It uses the context parameter to define the build's context as the set of files located in the specified path.
Expand Down
6 changes: 3 additions & 3 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ services:
image: nautical-backup # Use the local image
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- C:\Users\James-PC\IdeaProjects\nautical-backup\dev\source:/app/source
- C:\Users\James-PC\IdeaProjects\nautical-backup\dev\destination:/app/destination
- ./source:/app/source
- ./destination:/app/destination
entrypoint: /bin/bash app/test.sh
environment:
- EXIT_AFTER_INIT=true
- EXIT_AFTER_INIT=false
- LOG_LEVEL=DEBUG

0 comments on commit b2e5ea6

Please sign in to comment.