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
fix(ci): fix tests ci
  • Loading branch information
JacobCoffee committed Sep 19, 2024
commit d8c61f84ee5b66043cddbdf94181624949d28b0b
18 changes: 14 additions & 4 deletions .github/workflows/ci.yml
8000
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -17,6 +19,7 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install platform dependencies
run: |
sudo apt -y update
Expand All @@ -25,13 +28,15 @@ jobs:
texlive-latex-recommended \
texlive-plain-generic \
lmodern

- name: Install pandoc
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'

- name: Cache Python dependencies
uses: actions/cache@v4
env:
Expand All @@ -43,24 +48,29 @@ jobs:
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
${{ runner.os }}-${{ github.job }}-
${{ runner.os }}-

- name: Install Python dependencies
run: |
pip install -U pip setuptools wheel
pip install -r requirements/dev-requirements.txt

- name: Check for ungenerated database migrations
run: |
export PYTHONPATH=$PYTHONPATH:${{ github.workspace }}/app
export PYTHONPATH=${{ github.workspace }}:${{ github.workspace }}/app:$PYTHONPATH
cd app
python manage.py makemigrations --check --dry-run
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
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pythonorg

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

- name: Coverage
run: |
coverage report -m --fail-under=75
8 changes: 0 additions & 8 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ jobs:
pip install -U pip setuptools wheel
pip install -r requirements/requirements.txt -r requirements/prod-requirements.txt

- name: Debug Information
run: |
pwd
ls -R
cat app/manage.py
cat app/pydotorg/settings/static.py
grep -n "INSTALLED_APPS" app/pydotorg/settings/base.py

- name: Run collectstatic
run: |
export PYTHONPATH=$PYTHONPATH:${{ github.workspace }}
Expand Down
Loading
0