Skip to content

Commit

Permalink
Merge pull request #388 from SCIInstitute/update_download_upload_ci
Browse files Browse the repository at this point in the history
Use CI/CD keyword for download-upload-cycle
  • Loading branch information
akenmorris authored Jul 3, 2024
2 parents 41e5e8e + 4e3a89c commit 76da0a0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/download_upload_cycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
DJANGO_SUPERUSER_PASSWORD: django-password
DJANGO_SUPERUSER_USERNAME: admin
DJANGO_SUPERUSER_EMAIL: admin@noemail.com
CICD_PUBLIC_USER: ${{ secrets.CICD_PUBLIC_USER }}
CICD_PUBLIC_PASSWORD: ${{ secrets.CICD_PUBLIC_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion dev/prod.celery.env.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"DJANGO_CORS_ORIGIN_REGEX_WHITELIST": "",
"DJANGO_CORS_ORIGIN_WHITELIST": "https://www.shapeworks-cloud.org",
"DJANGO_HOMEPAGE_REDIRECT_URL": "https://www.shapeworks-cloud.org",
"DJANGO_DEFAULT_FROM_EMAIL": "admin@app.shapeworks-cloud.org",
"DJANGO_DEFAULT_FROM_EMAIL": "admin@shapeworks-cloud.org",
"DJANGO_STORAGE_BUCKET_NAME": "shapeworks-cloud-storage",
"SSL_CERT_DIR": "/etc/ssl/certs"
}
15 changes: 4 additions & 11 deletions swcc/tests/test_download_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,11 @@ def is_same(dir1, dir2):

def public_server_download(download_dir):
with swcc_session() as public_server_session:
public_server_session.login('testuser@noemail.nil', 'cicdtest')
username = os.getenv('CICD_PUBLIC_USER')
password = os.getenv('CICD_PUBLIC_PASSWORD')
public_server_session.login(username, password)
all_datasets = list(models.Dataset.list())
dataset_subset = [
d
for d in all_datasets
if d.name
in [
'deep_ssm_femur_tiny_test',
'ellipsoid_multiple_domain_tiny_test',
'left_atrium_tiny_test',
]
]
dataset_subset = [d for d in all_datasets if 'CI/CD' in d.keywords]
project_subset = [next(d.projects, None) for d in dataset_subset]
for project in project_subset:
if project is not None:
Expand Down
2 changes: 2 additions & 0 deletions swcc/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ passenv =
DJANGO_BASE_URL
DJANGO_SUPERUSER_EMAIL
DJANGO_SUPERUSER_PASSWORD
CICD_PUBLIC_USER
CICD_PUBLIC_PASSWORD
deps =
pytest
click
Expand Down

0 comments on commit 76da0a0

Please sign in to comment.