Skip to content

Commit

Permalink
Get exit code from test
Browse files Browse the repository at this point in the history
  • Loading branch information
Minituff committed Oct 24, 2023
1 parent 5828e3a commit b59f07f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ jobs:
tags: minituff/nautical-backup:test

- name: Test Docker image
# docker run --rm "${{ fromJSON(steps.meta.outputs.json).tags[0] }}-test"
run: |
cd tests
docker compose up
docker compose up --exit-code-from nautical-backup-test
# 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: 0 additions & 6 deletions pkg/test.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#!/bin/bash

EXIT_AFTER_INIT="true"
BACKUP_ON_START="false"
LOG_LEVEL="DEBUG"
CRON_SCHEDULE="0 8 * * *"
BACKUP_ON_START="true"

bash /entry.sh

echo "Running tests..."
Expand Down
4 changes: 3 additions & 1 deletion tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
- ./destination:/app/destination
entrypoint: /bin/bash app/test.sh
environment:
- EXIT_AFTER_INIT=false
- BACKUP_ON_START=true
- EXIT_AFTER_INIT=true
- LOG_LEVEL=DEBUG
- CRON_SCHEDULE=0 8 * * *
- REPORT_FILE=false

0 comments on commit b59f07f

Please sign in to comment.