Testing pull request #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: The RamenDR authors | |
# SPDX-License-Identifier: Apache-2.0 | |
--- | |
# yamllint disable rule:line-length | |
name: E2E | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
# Limit number of drenv workers. | |
MAX_WORKERS: 4 | |
ENV_NAME: rdr | |
ENV_FILE: envs/regional-dr.yaml | |
jobs: | |
e2e-rdr: | |
runs-on: [self-hosted, e2e-rdr-virt] | |
if: github.repository == 'nirs/ramen' && github.event.pull_request.author_association == 'OWNER' | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Create virtual environment | |
run: | | |
hack/make-venv .venv | |
- name: Delete clusters | |
if: ${{ always() }} | |
working-directory: test | |
run: | | |
source ../venv | |
drenv delete ${{ env.ENV_FILE }} | |
- name: Setup libvirt | |
run: test/scripts/setup-libvirt | |
- name: Start clusters | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
command: | | |
cd test | |
source ../venv | |
drenv start --max-workers ${{ env.MAX_WORKERS }} ${{ env.ENV_FILE }} | |
- name: Build ramen-operator container | |
run: make docker-build | |
- name: Deploy ramen | |
working-directory: test | |
run: | | |
source ../venv | |
ramenctl deploy --source-dir .. ${{ env.ENV_FILE }} | |
- name: Configure ramen | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_seconds: 60 | |
max_attempts: 3 | |
command: | | |
cd test | |
source ../venv | |
ramenctl config ${{ env.ENV_FILE }} | |
- name: Run e2e tests | |
run: | | |
cp ~/.config/drenv/${{ env.ENV_NAME }}/config.yaml e2e/config.yaml | |
make e2e-rdr | |
- name: Delete clusters | |
if: ${{ always() }} | |
working-directory: test | |
run: | | |
source ../venv | |
drenv delete ${{ env.ENV_FILE }} |