Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support workdir venv #1548

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
33 changes: 22 additions & 11 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,22 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Install drenv
run: pip install -e test
- name: Create virtual environment
run: |
hack/make-venv .venv

- name: Setup drenv
working-directory: test
run: drenv setup -v envs/regional-dr.yaml

- name: Install ramenctl
run: pip install -e ramenctl
run: |
source ../venv
drenv setup -v envs/regional-dr.yaml

- name: Delete clusters
if: always()
working-directory: test
run: drenv delete envs/regional-dr.yaml
run: |
source ../venv
drenv delete envs/regional-dr.yaml

- name: Setup libvirt
run: test/scripts/setup-libvirt
Expand All @@ -48,20 +50,25 @@ jobs:
max_attempts: 3
command: |
cd test
source ../venv
drenv start --max-workers ${{ env.MAX_WORKERS }} envs/regional-dr.yaml

- name: Build ramen-operator container
run: make docker-build

- name: Deploy ramen
run: ramenctl deploy test/envs/regional-dr.yaml
run: |
source venv
ramenctl deploy test/envs/regional-dr.yaml

- name: Configure ramen
uses: nick-fields/retry@v3
with:
timeout_seconds: 120
max_attempts: 3
command: ramenctl config test/envs/regional-dr.yaml
command: |
source venv
ramenctl config test/envs/regional-dr.yaml

- name: Run e2e tests
run: |
Expand Down Expand Up @@ -94,9 +101,13 @@ jobs:
- name: Delete clusters
if: always()
working-directory: test
run: drenv delete envs/regional-dr.yaml
run: |
source ../venv
drenv delete envs/regional-dr.yaml

- name: Cleanup drenv
if: always()
working-directory: test
run: drenv cleanup -v envs/regional-dr.yaml
run: |
source ../venv
drenv cleanup -v envs/regional-dr.yaml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ config/hub/bundle
.zed

# Generated files
.venv
venv

# Test enviromemnt generated files
Expand Down
2 changes: 1 addition & 1 deletion hack/make-venv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

venv=~/.venv/ramen
venv=${1:-~/.venv/ramen}

if [ -d "$venv" ]; then
echo "Virtual environemnt exists: '$venv'"
Expand Down