Skip to content

Commit

Permalink
CI tweaks (#256)
Browse files Browse the repository at this point in the history
* CI tweaks

* Specify cookie setting

* Enable debug mode

* More verbose logging
  • Loading branch information
SchrodingersGat authored Jan 10, 2025
1 parent d12e52a commit bc175d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ jobs:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INVENTREE_SITE_URL: http://localhost:8000
INVENTREE_DB_ENGINE: django.db.backends.sqlite3
INVENTREE_DB_NAME: ../inventree_unit_test_db.sqlite3
INVENTREE_MEDIA_ROOT: ../test_inventree_media
INVENTREE_STATIC_ROOT: ../test_inventree_static
INVENTREE_BACKUP_DIR: ../test_inventree_backup
INVENTREE_COOKIE_SAMESITE: False
INVENTREE_ADMIN_USER: testuser
INVENTREE_ADMIN_PASSWORD: testpassword
INVENTREE_ADMIN_EMAIL: [email protected]
INVENTREE_PYTHON_TEST_SERVER: http://localhost:12345
INVENTREE_PYTHON_TEST_USERNAME: testuser
INVENTREE_PYTHON_TEST_PASSWORD: testpassword
INVENTREE_DEBUG: True
INVENTREE_LOG_LEVEL: DEBUG

strategy:
max-parallel: 4
Expand All @@ -44,7 +48,7 @@ jobs:
invoke install
invoke migrate
invoke dev.import-fixtures
invoke dev.server -a 127.0.0.1:12345 &
invoke dev.server -a 0.0.0.0:12345 &
invoke wait
- name: Run Tests
run: |
Expand Down
6 changes: 3 additions & 3 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
version: "3.8"

# Docker compose recipe for spawning a simple InvenTree server instance,
# to use for running local tests of the InvenTree python API
# We use the latest (master branch) InvenTree code for testing.

# The tests should be targetted at localhost:12345
# The tests should be targeted at localhost:12345

services:

Expand All @@ -16,12 +14,14 @@ services:
- 12345:8000
environment:
- INVENTREE_DEBUG=True
- INVENTREE_SITE_URL=http://localhost:12345
- INVENTREE_DB_ENGINE=sqlite
- INVENTREE_DB_NAME=/home/inventree/data/test_db.sqlite3
- INVENTREE_DEBUG_LEVEL=error
- INVENTREE_ADMIN_USER=testuser
- INVENTREE_ADMIN_PASSWORD=testpassword
- [email protected]
- INVENTREE_COOKIE_SAMESITE=False
restart: unless-stopped
volumes:
- ./data:/home/inventree/data

0 comments on commit bc175d4

Please sign in to comment.