Debug for docker workflow (#4021)

* Debug for docker workflow

* Show docker image hash

* More debug output

* Debug system path

* Disable pty for invoke test

* Disable pty as part of invoke test

* remove debug statements

* Disable docker workflow on pull request
This commit is contained in:
Oliver 2022-12-09 00:15:26 +11:00 committed by GitHub
parent 0d00289b35
commit c4f0fa4d3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -48,7 +48,7 @@ jobs:
- name: Build Docker Image
# Build the development docker image (using docker-compose.yml)
run: |
docker-compose build
docker-compose build --no-cache
- name: Update Docker Image
run: |
docker-compose run inventree-dev-server invoke update
@ -69,7 +69,7 @@ jobs:
test -f data/secret_key.txt
- name: Run Unit Tests
run: |
docker-compose run inventree-dev-server invoke test
docker-compose run inventree-dev-server invoke test --disable-pty
docker-compose down
- name: Set up QEMU
if: github.event_name != 'pull_request'

View File

@ -534,13 +534,15 @@ def test_translations(c):
@task
def test(c, database=None):
def test(c, disable_pty=False):
"""Run unit-tests for InvenTree codebase."""
# Run sanity check on the django install
manage(c, 'check')
pty = not disable_pty
# Run coverage tests
manage(c, 'test', pty=True)
manage(c, 'test', pty=pty)
@task(help={'dev': 'Set up development environment at the end'})
@ -577,7 +579,7 @@ def setup_test(c, ignore_update=False, dev=False, path="inventree-demo-dataset")
shutil.copytree(src, dst, dirs_exist_ok=True)
print("Done setting up test enviroment...")
print("Done setting up test environment...")
print("========================================")
# Set up development setup if flag is set