Skip to content

Commit

Permalink
Merge tag 'v0.0.32' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
carolineechen committed Aug 11, 2024
2 parents fa6a963 + 3ad35d4 commit c874ee4
Show file tree
Hide file tree
Showing 159 changed files with 6,497 additions and 5,325 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/local_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ jobs:
token: ${{ secrets.CI_ACCOUNT_TOKEN }}
api_server_url: ${{ env.API_SERVER_URL }}

- name: pytest -v --level local -k "not servertest and not secrettest and not moduletest and not functiontest and not envtest"
- name: pytest -v --level local -k "not servertest and not secrettest and not moduletest and not functiontest and not envtest and not clustertest"
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
run: pytest -v --level local -k "not servertest and not secrettest and not moduletest and not functiontest and not envtest"
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "not servertest and not secrettest and not moduletest and not functiontest and not envtest and not clustertest"
timeout-minutes: 60

# secret-tests-logged-out-level-local:
Expand Down Expand Up @@ -123,6 +125,8 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "secrettest"
timeout-minutes: 60

Expand All @@ -146,6 +150,8 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "moduletest"
timeout-minutes: 60

Expand All @@ -169,6 +175,8 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "functiontest"
timeout-minutes: 60

Expand All @@ -192,5 +200,32 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "envtest"
timeout-minutes: 60

cluster-tests-logged-in-level-local:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup Runhouse
uses: ./.github/workflows/setup_runhouse

- name: Setup ~/.rh/config.yaml
uses: ./.github/workflows/setup_rh_config
with:
username: ${{ secrets.CI_ACCOUNT_USERNAME }}
token: ${{ secrets.CI_ACCOUNT_TOKEN }}
api_server_url: ${{ env.API_SERVER_URL }}

- name: pytest -v --level local -k "clustertest"
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "clustertest"
timeout-minutes: 60
10 changes: 10 additions & 0 deletions .github/workflows/local_tests_den_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "not servertest and not secrettest and not moduletest and not functiontest and not envtest" --api-server-url $API_SERVER_URL
timeout-minutes: 60

Expand Down Expand Up @@ -122,6 +124,8 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "secrettest" --api-server-url $API_SERVER_URL
timeout-minutes: 60

Expand All @@ -145,6 +149,8 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "moduletest" --api-server-url $API_SERVER_URL
timeout-minutes: 60

Expand All @@ -168,6 +174,8 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "functiontest" --api-server-url $API_SERVER_URL
timeout-minutes: 60

Expand All @@ -191,5 +199,7 @@ jobs:
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest -v --level local -k "envtest" --api-server-url $API_SERVER_URL
timeout-minutes: 60
226 changes: 226 additions & 0 deletions .github/workflows/nightly_release_testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
name: Nightly Release Tests

on:
workflow_dispatch:
schedule:
# Run every night at 2 AM UTC
- cron: '0 2 * * *'

jobs:
not-cluster-tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup Release Testing
uses: ./.github/workflows/setup_release_testing
with:
AWS_OSS_ROLE_ARN: ${{ secrets.AWS_OSS_ROLE_ARN }}
DEV_AWS_ACCESS_KEY: ${{ secrets.DEV_AWS_ACCESS_KEY }}
DEV_AWS_SECRET_KEY: ${{ secrets.DEV_AWS_SECRET_KEY }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
CI_ACCOUNT_TOKEN: ${{ secrets.CI_ACCOUNT_TOKEN }}
CI_ACCOUNT_USERNAME: ${{ secrets.CI_ACCOUNT_USERNAME }}
API_SERVER_URL: ${{ env.API_SERVER_URL }}

- name: Run not cluster tests
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest --level release tests -k "not cluster" --detached
timeout-minutes: 180

- name: Teardown all clusters
if: always()
run: |
sky status
sky down --all -y
sky status
cluster-tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup Release Testing
uses: ./.github/workflows/setup_release_testing
with:
AWS_OSS_ROLE_ARN: ${{ secrets.AWS_OSS_ROLE_ARN }}
DEV_AWS_ACCESS_KEY: ${{ secrets.DEV_AWS_ACCESS_KEY }}
DEV_AWS_SECRET_KEY: ${{ secrets.DEV_AWS_SECRET_KEY }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
CI_ACCOUNT_TOKEN: ${{ secrets.CI_ACCOUNT_TOKEN }}
CI_ACCOUNT_USERNAME: ${{ secrets.CI_ACCOUNT_USERNAME }}
API_SERVER_URL: ${{ env.API_SERVER_URL }}

- name: Run cluster and not on-demand tests
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest --level release tests -k "cluster and not ondemand" --detached
timeout-minutes: 180

- name: Teardown all cluster-tests clusters
if: always()
run: |
sky status
sky down --all -y
sky status
ondemand-aws-tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup Release Testing
uses: ./.github/workflows/setup_release_testing
with:
AWS_OSS_ROLE_ARN: ${{ secrets.AWS_OSS_ROLE_ARN }}
DEV_AWS_ACCESS_KEY: ${{ secrets.DEV_AWS_ACCESS_KEY }}
DEV_AWS_SECRET_KEY: ${{ secrets.DEV_AWS_SECRET_KEY }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
CI_ACCOUNT_TOKEN: ${{ secrets.CI_ACCOUNT_TOKEN }}
CI_ACCOUNT_USERNAME: ${{ secrets.CI_ACCOUNT_USERNAME }}
API_SERVER_URL: ${{ env.API_SERVER_URL }}

- name: Run on-demand aws tests
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest --level release tests -k "ondemand_aws_cluster" --detached
timeout-minutes: 180

- name: Teardown all ondemand-aws-tests clusters
if: always()
run: |
sky status
sky down --all -y
sky status
ondemand-gcp-tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup Release Testing
uses: ./.github/workflows/setup_release_testing
with:
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
AWS_OSS_ROLE_ARN: ${{ secrets.AWS_OSS_ROLE_ARN }}
DEV_AWS_ACCESS_KEY: ${{ secrets.DEV_AWS_ACCESS_KEY }}
DEV_AWS_SECRET_KEY: ${{ secrets.DEV_AWS_SECRET_KEY }}
CI_ACCOUNT_TOKEN: ${{ secrets.CI_ACCOUNT_TOKEN }}
CI_ACCOUNT_USERNAME: ${{ secrets.CI_ACCOUNT_USERNAME }}
API_SERVER_URL: ${{ env.API_SERVER_URL }}

- name: Run on-demand gcp tests
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest --level release tests -k "ondemand_gcp_cluster" --detached
timeout-minutes: 180

- name: Teardown all ondemand-gcp-tests clusters
if: always()
run: |
sky status
sky down --all -y
sky status
kubernetes-tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup Release Testing
uses: ./.github/workflows/setup_release_testing
with:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
AWS_OSS_ROLE_ARN: ${{ secrets.AWS_OSS_ROLE_ARN }}
DEV_AWS_ACCESS_KEY: ${{ secrets.DEV_AWS_ACCESS_KEY }}
DEV_AWS_SECRET_KEY: ${{ secrets.DEV_AWS_SECRET_KEY }}
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
CI_ACCOUNT_TOKEN: ${{ secrets.CI_ACCOUNT_TOKEN }}
CI_ACCOUNT_USERNAME: ${{ secrets.CI_ACCOUNT_USERNAME }}
API_SERVER_URL: ${{ env.API_SERVER_URL }}

- name: Run kubernetes tests
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
ORG_MEMBER_TOKEN: ${{ secrets.ORG_MEMBER_TOKEN }}
ORG_MEMBER_USERNAME: ${{ secrets.ORG_MEMBER_USERNAME }}
run: pytest --level release tests -k "ondemand_k8s_cluster" --detached
timeout-minutes: 180

check-cluster-status:
if: always()
needs:
- not-cluster-tests
- cluster-tests
- ondemand-aws-tests
- ondemand-gcp-tests
- kubernetes-tests
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Setup Release Testing
uses: ./.github/workflows/setup_release_testing
with:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
AWS_OSS_ROLE_ARN: ${{ secrets.AWS_OSS_ROLE_ARN }}
DEV_AWS_ACCESS_KEY: ${{ secrets.DEV_AWS_ACCESS_KEY }}
DEV_AWS_SECRET_KEY: ${{ secrets.DEV_AWS_SECRET_KEY }}
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
CI_ACCOUNT_TOKEN: ${{ secrets.CI_ACCOUNT_TOKEN }}
CI_ACCOUNT_USERNAME: ${{ secrets.CI_ACCOUNT_USERNAME }}
API_SERVER_URL: ${{ env.API_SERVER_URL }}

- name: Wait to check cluster status
run: sleep 600 # 10 minutes

- name: Check cluster status
run: sky status
Loading

0 comments on commit c874ee4

Please sign in to comment.