Skip to content

Fix replica return (#108) #503

Fix replica return (#108)

Fix replica return (#108) #503

Workflow file for this run

name: Docker tests (5.7)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
GO_VERSION: 1.21.6
DOCKER_API_VERSION: 1.43
jobs:
buildimages:
name: Build images
runs-on: ubuntu-20.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Docker images caching
id: cache-images
uses: actions/cache@v4
with:
path: ~/mysync-base-img.tgz
key: mysync-base-img-${{ hashFiles('tests/images/base/*') }}
- name: Build images
if: steps.cache-images.outputs.cache-hit != 'true'
run: make base_img
- name: Export image
if: steps.cache-images.outputs.cache-hit != 'true'
run: docker save mysync-test-base | gzip -c > ~/mysync-base-img.tgz
test:
name: test
runs-on: ubuntu-20.04
needs: [ buildimages ]
strategy:
matrix:
command:
- 'GODOG_FEATURE=active_nodes.feature make test'
- 'GODOG_FEATURE=async.feature make test'
- 'GODOG_FEATURE=cascade_replicas.feature make test'
- 'GODOG_FEATURE=CLI.feature make test'
- 'GODOG_FEATURE=crash_recovery.feature make test'
- 'GODOG_FEATURE=events_reenable.feature make test'
- 'GODOG_FEATURE=failover.feature make test'
- 'GODOG_FEATURE=free_space.feature make test'
- 'GODOG_FEATURE=host_discovery.feature make test'
- 'GODOG_FEATURE=host_management.feature make test'
- 'GODOG_FEATURE=maintenance.feature make test'
- 'GODOG_FEATURE=offline_mode.feature make test'
- 'GODOG_FEATURE=priority.feature make test'
- 'GODOG_FEATURE=readonly_filesystem.feature make test'
- 'GODOG_FEATURE=recovery.feature make test'
- 'GODOG_FEATURE=repair.feature make test'
- 'GODOG_FEATURE=statefile.feature make test'
- 'GODOG_FEATURE=switchover_from.feature make test'
- 'GODOG_FEATURE=switchover_to.feature make test'
- 'GODOG_FEATURE=zk_failure.feature make test'
- 'GODOG_FEATURE=zk_maintenance.feature make test'
fail-fast: false
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Load docker images
id: cache-images
uses: actions/cache@v4
with:
path: ~/mysync-base-img.tgz
key: mysync-base-img-${{ hashFiles('tests/images/base/*') }}
- name: Fail if no cached images
if: steps.cache-images.outputs.cache-hit != 'true'
run: |
echo "Failed to fetch cached docker images. Will now exit..."
exit 1
- name: Import image
run: docker load -i ~/mysync-base-img.tgz
- name: Run test
run: ${{ matrix.command }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: logs
path: tests/logs