Skip to content

Commit

Permalink
update release testing github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra Belousov authored and Alexandra Belousov committed Dec 9, 2024
1 parent fc2ea31 commit 391cefe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 29 deletions.
26 changes: 7 additions & 19 deletions .github/workflows/nightly_release_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ jobs:
- name: Teardown all clusters
if: always()
run: |
sky status
sky down --all -y
sky status
runhouse cluster down --all -y
cluster-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -73,15 +71,13 @@ jobs:
KITCHEN_TESTER_USERNAME: ${{ secrets.KITCHEN_TESTER_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_PROD_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest --level release tests -k "clustertest and not ondemand" --detached
run: pytest --level release tests -k "cluster and not ondemand and not TestMultiNodeCluster" --detached
timeout-minutes: 60

- name: Teardown all cluster-tests clusters
if: always()
run: |
sky status
sky down --all -y
sky status
runhouse cluster down --all -y
ondemand-aws-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -120,9 +116,7 @@ jobs:
- name: Teardown all ondemand-aws-tests clusters
if: always()
run: |
sky status
sky down --all -y
sky status
runhouse cluster down --all -y
ondemand-aws-multinode-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -158,9 +152,7 @@ jobs:
- name: Teardown all ondemand-aws-multinode clusters
if: always()
run: |
sky status
sky down --all -y
sky status
runhouse cluster down --all -y
ondemand-gcp-tests:
Expand Down Expand Up @@ -197,9 +189,7 @@ jobs:
- name: Teardown all ondemand-gcp-tests clusters
if: always()
run: |
sky status
sky down --all -y
sky status
runhouse cluster down --all -y
kubernetes-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -235,9 +225,7 @@ jobs:
- name: Teardown all kubernetes-tests clusters
if: always()
run: |
sky status
sky down --all -y
sky status
runhouse cluster down --all -y
check-cluster-status:
if: always()
Expand Down
16 changes: 8 additions & 8 deletions tests/fixtures/on_demand_cluster_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ def ondemand_aws_docker_cluster(request):


@pytest.fixture(scope="session")
def den_launched_ondemand_aws_docker_cluster(request):
def den_launched_ondemand_aws_docker_cluster(request, test_rns_folder):
"""
Note: Also used to test docker and default env with alternate Ray version.
"""
args = {
"name": "aws-cpu-den",
"name": f"{test_rns_folder}-aws-cpu-den",
"instance_type": "CPU:2+",
"provider": "aws",
"image_id": "docker:rayproject/ray:latest-py311-cpu",
Expand Down Expand Up @@ -166,14 +166,14 @@ def ondemand_k8s_cluster(request):


@pytest.fixture(scope="session")
def den_launched_ondemand_aws_k8s_cluster(request):
def den_launched_ondemand_aws_k8s_cluster(request, test_rns_folder):
kube_config_path = Path.home() / ".kube" / "config"

if not kube_config_path.exists():
pytest.skip("no kubeconfig found")

args = {
"name": "k8s-cpu-den",
"name": f"{test_rns_folder}-k8s-cpu-den",
"provider": "kubernetes",
"instance_type": "CPU:1",
"memory": ".2",
Expand All @@ -185,14 +185,14 @@ def den_launched_ondemand_aws_k8s_cluster(request):


@pytest.fixture(scope="session")
def den_launched_ondemand_gcp_k8s_cluster(request):
def den_launched_ondemand_gcp_k8s_cluster(request, test_rns_folder):
kube_config_path = Path.home() / ".kube" / "config"

if not kube_config_path.exists():
pytest.skip("no kubeconfig found")

args = {
"name": "k8s-cpu-den",
"name": f"{test_rns_folder}-k8s-cpu-den",
"provider": "kubernetes",
"instance_type": "CPU:1",
"memory": ".2",
Expand Down Expand Up @@ -235,9 +235,9 @@ def v100_gpu_cluster(request):


@pytest.fixture(scope="session")
def den_launcher_v100_gpu_cluster(request):
def den_launcher_v100_gpu_cluster(request, test_rns_folder):
args = {
"name": "rh-v100-den",
"name": f"{test_rns_folder}-rh-v100-den",
"instance_type": "V100:1",
"provider": "aws",
"launcher": LauncherType.DEN,
Expand Down
6 changes: 4 additions & 2 deletions tests/fixtures/static_cluster_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from runhouse.resources.hardware.utils import LauncherType

from tests.conftest import init_args
from tests.fixtures.resource_fixtures import create_folder_path
from tests.utils import test_env


Expand All @@ -21,8 +22,9 @@ def setup_static_cluster(
):
instance_type = "CPU:4" if compute_type == computeType.cpu else "g5.xlarge"
launcher = launcher if launcher else LauncherType.LOCAL
cluster_name = f"{create_folder_path()}-{launcher}-aws-{compute_type}-password"
cluster = rh.cluster(
f"{launcher}-aws-{compute_type}-password",
name=cluster_name,
instance_type=instance_type,
provider="aws",
launcher=launcher,
Expand Down Expand Up @@ -53,7 +55,7 @@ def setup_static_cluster(
"ssh_private_key": "~/.ssh/sky-key",
"password": "cluster-pass",
}
args = dict(name="static-cpu-password", host=[cluster.head_ip], ssh_creds=ssh_creds)
args = dict(name=cluster_name, host=[cluster.head_ip], ssh_creds=ssh_creds)
c = rh.cluster(**args).save()
c.restart_server(resync_rh=True)
init_args[id(c)] = args
Expand Down

0 comments on commit 391cefe

Please sign in to comment.