Fix for docker workflow (#3989)

* Update docker workflow

* typo fix

* Run tests differently in docker

* Settings tweak

* revert settings change

* Don't build docker image on PR
This commit is contained in:
Oliver 2022-11-22 23:28:16 +11:00 committed by GitHub
parent 8cd782dc8f
commit ff400106d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -49,12 +49,14 @@ jobs:
# Build the development docker image (using docker-compose.yml)
run: |
docker-compose build
- name: Run Unit Tests
- name: Update Docker Image
run: |
docker-compose run inventree-dev-server invoke update
docker-compose run inventree-dev-server invoke setup-dev
docker-compose up -d
docker-compose run inventree-dev-server invoke wait
- name: Run Unit Tests
run: |
docker-compose run inventree-dev-server invoke test
docker-compose down
- name: Check Data Directory

View File

@ -777,13 +777,14 @@ class TestSettings(helpers.InvenTreeTestCase):
"""Test if install of plugins on startup works."""
from plugin import registry
# Check an install run
response = registry.install_plugin_file()
self.assertEqual(response, 'first_run')
if not settings.DOCKER:
# Check an install run
response = registry.install_plugin_file()
self.assertEqual(response, 'first_run')
# Set dynamic setting to True and rerun to launch install
InvenTreeSetting.set_setting('PLUGIN_ON_STARTUP', True, self.user)
registry.reload_plugins(full_reload=True)
# Set dynamic setting to True and rerun to launch install
InvenTreeSetting.set_setting('PLUGIN_ON_STARTUP', True, self.user)
registry.reload_plugins(full_reload=True)
# Check that there was anotehr run
response = registry.install_plugin_file()