Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.11"]
Expand Down Expand Up @@ -37,7 +37,8 @@ jobs:
run: python -c "import sys; print(sys.version)"
- name: Setup Python
run: |
sudo apt-get update && sudo apt-get install python3-enchant -y
sudo apt-get update
sudo apt-get install python3-enchant -y
pip install --upgrade pip
pip install tox coveralls
- name: Run tox
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Integration Tests

on:
pull_request:
push:
branches:
- "develop"
- "main"

jobs:
integration:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
services:
postgres:
image: postgres:11.1
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: bsync_validator
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Python dependencies
run: |
sudo apt-get update
pip install --upgrade pip
pip install -r requirements-test.txt
- name: Setup Django
env:
DJANGO_SETTINGS_MODULE: bsyncviewer.settings.gh_actions
run: |
python manage.py collectstatic --noinput
python manage.py migrate
- name: Start Django server
env:
DJANGO_SETTINGS_MODULE: bsyncviewer.settings.gh_actions
run: |
python manage.py runserver 8000 &
echo $! > server.pid
sleep 10 # Give server time to start
- name: Test home page loads
run: |
curl -f -s -o /dev/null http://localhost:8000/ || (echo "Home page failed to load" && exit 1)
echo "✅ Home page loaded successfully"
- name: Stop Django server
if: always()
run: |
if [ -f server.pid ]; then
kill $(cat server.pid) || true
rm server.pid
fi