8000 POC: restructure app by JacobCoffee · Pull Request #2573 · python/pythondotorg · GitHub
[go: up one dir, main page]

Skip to content

POC: restructure app #2573

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

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore(ci): clean up debug stuff from static ci, fix test ci
  • Loading branch information
JacobCoffee committed Sep 19, 2024
commit 8565afe7b70a1210fb41d9a235016a3cc9d1e10d
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
POSTGRES_DB: pythonorg
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -33,6 +33,7 @@ jobs:
run: |
wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb
sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb

- uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
Expand All @@ -56,18 +57,17 @@ jobs:

- name: Check for ungenerated database migrations
run: |
export PYTHONPATH=${{ github.workspace }}:${{ github.workspace }}/app:$PYTHONPATH
cd app
DJANGO_SETTINGS_MODULE=pydotorg.settings.dev python -c "import django; print(django.__file__); from django.conf import settings; print(settings.BASE_DIR)"
DJANGO_SETTINGS_MODULE=pydotorg.settings.dev python manage.py makemigrations --check --dry-run
export PYTHONPATH=$PYTHONPATH:${{ github.workspace }}
cd ${{ github.workspace }}
DJANGO_SETTINGS_MODULE=app.pydotorg.settings.dev python app/manage.py makemigrations --check --dry-run
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pythonorg

- name: Run Tests
run: |
export PYTHONPATH=${{ github.workspace }}:${{ github.workspace }}/app:$PYTHONPATH
cd app
DJANGO_SETTINGS_MODULE=pydotorg.settings.dev python -Wd -m coverage run manage.py t 8000 est -v2
export PYTHONPATH=$PYTHONPATH:${{ github.workspace }}
cd ${{ github.workspace }}
DJANGO_SETTINGS_MODULE=app.pydotorg.settings.dev python -Wd -m coverage run app/manage.py test -v2
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pythonorg

Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,4 @@ jobs:
- name: Run collectstatic
run: |
export PYTHONPATH=$PYTHONPATH:${{ github.workspace }}
cd ${{ github.workspace }}
echo "PYTHONPATH: $PYTHONPATH"
echo "Current directory: $(pwd)"
ls -la
python -c "import sys; print('Python path:', sys.path)"
python -c "import django; print('Django version:', django.__version__)"
DJANGO_SETTINGS_MODULE=app.pydotorg.settings.static python -c "from django.conf import settings; print('INSTALLED_APPS:', settings.INSTALLED_APPS)"
DJANGO_SETTINGS_MODULE=app.pydotorg.settings.static python app/manage.py collectstatic --noinput
DJANGO_SETTINGS_MODULE=app.pydotorg.settings.static python app/manage.py collectstatic --noinput
Loading
0