Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/tests/default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,17 @@ print_heading "Check if zammad-backup created a database backup"
# Check that the db dump actually has content in the .gz file to catch cases where pg_dump fails.
docker compose exec zammad-backup sh -c "find /var/tmp/zammad/ -name \"*zammad_db.psql.gz\" -size +1k | grep ."
print_heading "Database backup successful :)"

print_heading "Stop the stack"
docker compose down -t0

print_heading "Copy backup files to restore folder"
docker compose run --rm zammad-backup sh -c "mkdir /var/tmp/zammad/restore && cp /var/tmp/zammad/*gz /var/tmp/zammad/restore/"

print_heading "Start the stack again"
docker compose up -d
check_stack_start

print_heading "Check that restore folder was renamed after successful restore..."
docker compose exec zammad-backup sh -c "[ ! -d /var/tmp/zammad/restore ]"
print_heading "Restore folder was renamed after successful restore..."
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ jobs:

- name: Set up test environment
run: .github/tests/setup/${{ matrix.module }}.sh
env:
VERSION: 'develop' # TODO: revert before merging!
Comment on lines +64 to +65
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: revert before merging


- name: Run tests
run: .github/tests/${{ matrix.module }}.sh
env:
VERSION: 'develop' # TODO: revert before merging!
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ x-shared:
image: ${IMAGE_REPO:-ghcr.io/zammad/zammad}:${VERSION:-6.5.0-75}
restart: ${RESTART:-always}
volumes:
- zammad-backup:/var/tmp/zammad:ro # needed for waiting on restore operations
- zammad-storage:/opt/zammad/storage
depends_on:
- zammad-memcached
Expand All @@ -67,7 +68,7 @@ services:
command: ["zammad-backup"]
volumes:
- zammad-backup:/var/tmp/zammad
- zammad-storage:/opt/zammad/storage:ro
- zammad-storage:/opt/zammad/storage
user: 0:0

zammad-elasticsearch:
Expand Down
Loading