Skip to content

Commit

Permalink
Stop using AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
iurisilvio committed Feb 7, 2024
1 parent 7e6a15d commit 7c5a598
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/example-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,12 @@ jobs:
- name: Migrate database
run: |
./manage.py migrateci -v3 --parallel $(nproc)
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
- name: Migrate database again to reuse cache
run: |
./manage.py migrateci -v3 --parallel $(nproc)
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
- name: Test with Django
run: |
./manage.py test -v3 --keepdb
- name: Test with pytest-django
run: |
pytest -vvv --migrateci --reuse-db -n $(nproc)
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
9 changes: 0 additions & 9 deletions example/example/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,3 @@
},
}
}

# AWS credentials (AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY) are defined
# in .github/workflows/example-test.yml as environment variables.
AWS_STORAGE_BUCKET_NAME = "example-migrateci-cache"
AWS_S3_REGION_NAME = "us-east-2"

# Use S3 only if github action provided secrets for that.
if os.getenv("AWS_ACCESS_KEY_ID"):
MIGRATECI_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
2 changes: 1 addition & 1 deletion example/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
django
django-storages[boto3]
django-storages
pytest
pytest-django<4.7
pytest-xdist

0 comments on commit 7c5a598

Please sign in to comment.