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

Update tests for bucket cleanup + remove unnecessary installs #865

Merged
merged 4 commits into from
Jun 15, 2023
Merged
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
25 changes: 19 additions & 6 deletions .github/workflows/integration-test-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,36 @@ jobs:
STRATEGY_UUID: itest-d-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v1
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install skyplane from pypi
run: pip install skyplane[aws,azure,gcp]
cache: "poetry"
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install dependencies
run: poetry install -E aws -E azure -E gcp
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Skyplane init
run: |
skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
skyplane init -y --disable-config-azure --disable-config-cloudflare
skyplane config set usage_stats false
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane init -y --disable-config-azure --disable-config-cloudflare
poetry run skyplane config set usage_stats false
- name: Deprovision
run: skyplane deprovision
run: poetry run skyplane deprovision
- name: Delete matching S3 buckets
run: |
for pattern in "test-skyplane-" "skyplane-integration-us-east-1-" "integrationus-east-1-"; do
aws s3api list-buckets --query "Buckets[?starts_with(Name, \`${pattern}\`) == \`true\`].Name" --output text | tr '\t' '\n' | while read bucket; do aws s3 rb "s3://$bucket" --force; done
done
- name: Cleanup GCP service account
if: always()
run: gcloud iam service-accounts delete --quiet ${{ env.STRATEGY_UUID }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com
21 changes: 15 additions & 6 deletions .github/workflows/integration-test-multiple-sizes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,32 @@ jobs:
STRATEGY_UUID: itest-d-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v1
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install skyplane from pypi
run: pip install skyplane[aws,azure,gcp]
cache: "poetry"
- name: Install dependencies
run: poetry install -E aws -E azure -E gcp
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Skyplane init
run: |
skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
skyplane init -y --disable-config-azure --disable-config-cloudflare
skyplane config set usage_stats false
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane init -y --disable-config-azure --disable-config-cloudflare
poetry run skyplane config set usage_stats false
- name: Deprovision
run: skyplane deprovision
run: poetry run skyplane deprovision
- name: Delete matching S3 buckets
run: |
for pattern in "test-skyplane-" "skyplane-integration-us-east-1-" "integrationus-east-1-"; do
aws s3api list-buckets --query "Buckets[?starts_with(Name, \`${pattern}\`) == \`true\`].Name" --output text | tr '\t' '\n' | while read bucket; do aws s3 rb "s3://$bucket" --force; done
done
- name: Cleanup GCP service account
if: always()
run: gcloud iam service-accounts delete --quiet ${{ env.STRATEGY_UUID }}@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com
8 changes: 4 additions & 4 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ jobs:
credentials_json: '${{ secrets.GCP_CREDENTIALS_JSON }}'
- name: Skyplane init
run: |
skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
skyplane init -y --disable-config-azure
skyplane config set usage_stats false
poetry run skyplane config set gcp_service_account_name ${{ env.STRATEGY_UUID }}
poetry run skyplane init -y --disable-config-azure
poetry run skyplane config set usage_stats false
- name: Deprovision
run: skyplane deprovision
run: poetry run skyplane deprovision
- name: Delete matching S3 buckets
run: |
for pattern in "test-skyplane-" "skyplane-integration-us-east-1-" "integrationus-east-1-"; do
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ jobs:
run: |
poetry install -E gateway -E solver -E aws -E azure -E gcp -E ibm
poetry run pip install -r requirements-dev.txt
poetry run sudo apt install default-jdk
poetry run wget https://archive.apache.org/dist/hadoop/core/hadoop-3.3.0/hadoop-3.3.0.tar.gz -P /tmp && tar -xzf /tmp/hadoop-3.3.0.tar.gz -C /tmp && sudo mv /tmp/hadoop-3.3.0 /usr/local/hadoop && rm /tmp/hadoop-3.3.0.tar.gz
if: steps.cache.outputs.cache-hit != 'true'
- name: Run cloud tests
env:
Expand Down Expand Up @@ -156,7 +154,6 @@ jobs:
poetry install -E gateway -E solver -E aws -E azure -E gcp -E ibm
poetry run pip install -r requirements-dev.txt
poetry run sudo apt install default-jdk
poetry run wget https://archive.apache.org/dist/hadoop/core/hadoop-3.3.0/hadoop-3.3.0.tar.gz -P /tmp && tar -xzf /tmp/hadoop-3.3.0.tar.gz -C /tmp && sudo mv /tmp/hadoop-3.3.0 /usr/local/hadoop && rm /tmp/hadoop-3.3.0.tar.gz
if: steps.cache.outputs.cache-hit != 'true'
- id: 'auth'
uses: 'google-github-actions/auth@v0'
Expand Down