Aggiorno dall'upstream
This commit is contained in:
+21
-10
@@ -4,15 +4,15 @@
|
||||
_You can skip this and just use docker if you want_
|
||||
|
||||
Install pyenv
|
||||
pyenv install 3.8.0
|
||||
pyenv install 3.9.9
|
||||
|
||||
Create **virtualenv** via pyenv
|
||||
|
||||
```
|
||||
pyenv vituralenv 3.8.0 django-admin-confirm-3.8.0
|
||||
pyenv virtualenv 3.9.9 django-admin-confirm-3.9.9
|
||||
```
|
||||
|
||||
Now your terminal should have `(django-admin-confirm-3.8.0)` prefix, because `.python-version` should have auto switch your virtual env
|
||||
Now your terminal should have `(django-admin-confirm-3.9.9)` prefix, because `.python-version` should have auto switch your virtual env
|
||||
|
||||
Install requirements
|
||||
|
||||
@@ -63,15 +63,22 @@ from admin_confirm.utils import log
|
||||
log('Message to send to stdout')
|
||||
```
|
||||
|
||||
**Localstack**:
|
||||
Localstack is used for integration testing and also in the test project.
|
||||
|
||||
To check if localstack is running correctly, go to `http://localhost:4566`
|
||||
To check if the bucket has been set up correctly, go to `http://localhost:4566/mybucket`
|
||||
To check if the static files have been set up correctly, go to `http://localhost:4566/mybucket/static/admin/css/base.css`
|
||||
|
||||
**Docker:**
|
||||
|
||||
Instead of local set-up, you can also use docker.
|
||||
Instead of local set-up, you can also use docker. You may have to delete `.python-version` to do this.
|
||||
|
||||
Install docker-compose (or Docker Desktop which installs this for you)
|
||||
|
||||
```
|
||||
docker-compose build
|
||||
docker-compose up -d
|
||||
docker-compose -f docker-compose.dev.yml build
|
||||
docker-compose -f docker-compose.dev.yml up -d
|
||||
```
|
||||
|
||||
You should now be able to see the app running on `localhost:8000`
|
||||
@@ -79,20 +86,22 @@ You should now be able to see the app running on `localhost:8000`
|
||||
If you haven't already done migrations and created a superuser, you'll want to do it here
|
||||
|
||||
```
|
||||
docker-compose exec web tests/manage.py migrate
|
||||
docker-compose exec web tests/manage.py createsuperuser
|
||||
docker-compose -f docker-compose.dev.yml exec web tests/manage.py migrate
|
||||
docker-compose -f docker-compose.dev.yml exec web tests/manage.py createsuperuser
|
||||
```
|
||||
|
||||
Running tests in docker:
|
||||
|
||||
```
|
||||
docker-compose exec -T web make test-all
|
||||
docker-compose -f docker-compose.dev.yml exec -T web make test-all
|
||||
```
|
||||
|
||||
The integration tests are set up within docker. I recommend running the integration tests only in docker.
|
||||
|
||||
Docker is also set to mirror local folder so that you can edit code/tests and don't have to rebuild to run new code/tests.
|
||||
|
||||
Use `docker-compose -f docker-compose.dev.yml up -d --force-recreate` if you need to restart the docker containers. For example when updating the docker-compose.yml file, but if you change `Dockerfile` you have to rebuild.
|
||||
|
||||
### Release process
|
||||
|
||||
Honestly this part is just for my reference. But who knows :) maybe we'll have another maintainer in the future.
|
||||
@@ -100,7 +109,7 @@ Honestly this part is just for my reference. But who knows :) maybe we'll have a
|
||||
Run tests, check coverage, check readme
|
||||
|
||||
```
|
||||
docker-compose exec -T web make test-all
|
||||
docker-compose -f docker-compose.dev.yml exec -T web make test-all
|
||||
make check-readme
|
||||
```
|
||||
|
||||
@@ -126,3 +135,5 @@ make run
|
||||
```
|
||||
|
||||
Go on github and make a release in UI
|
||||
|
||||
To update supported version badges, use https://shields.io
|
||||
|
||||
Reference in New Issue
Block a user