mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
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:
parent
0d00289b35
commit
c4f0fa4d3a
4
.github/workflows/docker.yaml
vendored
4
.github/workflows/docker.yaml
vendored
@ -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'
|
||||
|
8
tasks.py
8
tasks.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user