Skip to content

Commit

Permalink
Switch to using dotenv and uv for managing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed May 3, 2024
1 parent 874b71a commit d2ae8d1
Show file tree
Hide file tree
Showing 6 changed files with 1,126 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Install pipenv and wheel for managing dependencies
run: |
python -m pip install --upgrade pipenv wheel
python -m pip install --upgrade uv wheel
- name: Set up a cache-key for installations of dependencies, in .venv
id: cache-pipenv
Expand All @@ -57,13 +57,12 @@ jobs:
# when deploying versus running tests
# if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pipenv install --deploy --dev --verbose
uv pip install -r requirements/requirements.dev.generated.txt
- name: Run tests
run: |
pipenv run pytest
dotenv -f env.test run -- pytest
env:
PIPENV_DOTENV_LOCATION: .env.test
DOMAIN_SNAPSHOT_BUCKET: ${{ secrets.TESTING_DOMAIN_SNAPSHOT_BUCKET }}
DATABASE_URL_READ_ONLY: ${{ secrets.TESTING_DATABASE_URL_READ_ONLY }}
OBJECT_STORAGE_ACCESS_KEY_ID: ${{ secrets.TESTING_OBJECT_STORAGE_ACCESS_KEY_ID }}
Expand Down
2 changes: 1 addition & 1 deletion ansible/templates/run_gunicorn.sh.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# supervisor can only control processes it started itself.
# So we need to use exec to replace the parent shell script process
# that starts pipenv
exec python -m pipenv run gunicorn greenweb.wsgi -b {{ internal_ip }}:{{ gunicorn_port }} -t 300 -c gunicorn.conf.py --statsd-host=10.0.0.2:9125 --statsd-prefix=member.app
exec dotenv run -- gunicorn greenweb.wsgi -b {{ internal_ip }}:{{ gunicorn_port }} -t 300 -c gunicorn.conf.py --statsd-host=10.0.0.2:9125 --statsd-prefix=member.app
Loading

0 comments on commit d2ae8d1

Please sign in to comment.