Skip to content

Commit bc175d4

Browse files
CI tweaks (#256)
* CI tweaks * Specify cookie setting * Enable debug mode * More verbose logging
1 parent d12e52a commit bc175d4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ jobs:
88

99
env:
1010
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
INVENTREE_SITE_URL: http://localhost:8000
1112
INVENTREE_DB_ENGINE: django.db.backends.sqlite3
1213
INVENTREE_DB_NAME: ../inventree_unit_test_db.sqlite3
1314
INVENTREE_MEDIA_ROOT: ../test_inventree_media
1415
INVENTREE_STATIC_ROOT: ../test_inventree_static
1516
INVENTREE_BACKUP_DIR: ../test_inventree_backup
17+
INVENTREE_COOKIE_SAMESITE: False
1618
INVENTREE_ADMIN_USER: testuser
1719
INVENTREE_ADMIN_PASSWORD: testpassword
1820
INVENTREE_ADMIN_EMAIL: [email protected]
1921
INVENTREE_PYTHON_TEST_SERVER: http://localhost:12345
2022
INVENTREE_PYTHON_TEST_USERNAME: testuser
2123
INVENTREE_PYTHON_TEST_PASSWORD: testpassword
24+
INVENTREE_DEBUG: True
25+
INVENTREE_LOG_LEVEL: DEBUG
2226

2327
strategy:
2428
max-parallel: 4
@@ -44,7 +48,7 @@ jobs:
4448
invoke install
4549
invoke migrate
4650
invoke dev.import-fixtures
47-
invoke dev.server -a 127.0.0.1:12345 &
51+
invoke dev.server -a 0.0.0.0:12345 &
4852
invoke wait
4953
- name: Run Tests
5054
run: |

test/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
version: "3.8"
2-
31
# Docker compose recipe for spawning a simple InvenTree server instance,
42
# to use for running local tests of the InvenTree python API
53
# We use the latest (master branch) InvenTree code for testing.
64

7-
# The tests should be targetted at localhost:12345
5+
# The tests should be targeted at localhost:12345
86

97
services:
108

@@ -16,12 +14,14 @@ services:
1614
- 12345:8000
1715
environment:
1816
- INVENTREE_DEBUG=True
17+
- INVENTREE_SITE_URL=http://localhost:12345
1918
- INVENTREE_DB_ENGINE=sqlite
2019
- INVENTREE_DB_NAME=/home/inventree/data/test_db.sqlite3
2120
- INVENTREE_DEBUG_LEVEL=error
2221
- INVENTREE_ADMIN_USER=testuser
2322
- INVENTREE_ADMIN_PASSWORD=testpassword
2423
24+
- INVENTREE_COOKIE_SAMESITE=False
2525
restart: unless-stopped
2626
volumes:
2727
- ./data:/home/inventree/data

0 commit comments

Comments
 (0)