|
34 | 34 | MAX_RETRIES=20 |
35 | 35 | RETRY_INTERVAL=5 |
36 | 36 | for i in $(seq 1 $MAX_RETRIES); do |
37 | | - docker compose exec trinity-node-1 ray status && docker compose exec trinity-node-2 ray status && break |
| 37 | + if docker compose exec trinity-node-1 bash -c "source /opt/venv/bin/activate && ray status" \ |
| 38 | + && docker compose exec trinity-node-2 bash -c "source /opt/venv/bin/activate && ray status"; then |
| 39 | + break |
| 40 | + fi |
38 | 41 | echo "Waiting for ray cluster to be ready... ($i/$MAX_RETRIES)" |
39 | 42 | sleep $RETRY_INTERVAL |
40 | 43 | if [ "$i" -eq "$MAX_RETRIES" ]; then |
@@ -76,12 +79,12 @@ jobs: |
76 | 79 | TYPE="${{ steps.test_type.outputs.type }}" |
77 | 80 | if [ "$TYPE" = "all" ]; then |
78 | 81 | echo "tests_run=true" >> $GITHUB_ENV |
79 | | - docker compose exec trinity-node-1 pytest tests -v -s --ctrf report.json |
| 82 | + docker compose exec trinity-node-1 bash -c "source /opt/venv/bin/activate && pytest tests -v -s --ctrf report.json" |
80 | 83 | elif [ "$TYPE" = "diff" ]; then |
81 | 84 | if [ -s ../../../test_dirs.txt ]; then |
82 | 85 | echo "tests_run=true" >> $GITHUB_ENV |
83 | 86 | TEST_DIRS=$(cat ../../../test_dirs.txt | xargs) |
84 | | - docker compose exec trinity-node-1 pytest $TEST_DIRS -v -s --ctrf report.json |
| 87 | + docker compose exec trinity-node-1 bash -c "source /opt/venv/bin/activate && pytest $TEST_DIRS -v -s --ctrf report.json" |
85 | 88 | else |
86 | 89 | echo "No changed modules detected, skipping tests." |
87 | 90 | echo "tests_run=false" >> $GITHUB_ENV |
|
90 | 93 | MODULE="${{ steps.test_type.outputs.module }}" |
91 | 94 | if [ -n "$MODULE" ]; then |
92 | 95 | echo "tests_run=true" >> $GITHUB_ENV |
93 | | - docker compose exec trinity-node-1 pytest tests/$MODULE -v -s --ctrf report.json |
| 96 | + docker compose exec trinity-node-1 bash -c "source /opt/venv/bin/activate && pytest tests/$MODULE -v -s --ctrf report.json" |
94 | 97 | else |
95 | 98 | echo "No module specified, skipping tests." |
96 | 99 | echo "tests_run=false" >> $GITHUB_ENV |
|
0 commit comments