Skip to content

Commit

Permalink
Fail-fast before running tests if repository was not fully cloned (#3429
Browse files Browse the repository at this point in the history
)

Co-authored-by: Shatakshi Mishra <shatakshimishra01@gmail.com>
  • Loading branch information
ssbarnea and shatakshiiii authored May 11, 2023
1 parent b90912c commit 1074122
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ deps =
extras =
test
commands_pre =
# fail if submodules are not initialized
sh -c 'git submodule status --cached | grep "^ -" && { echo "Repository was not cloned recursively, please run: git submodule update --init" && exit 99; } || true'
sh -c "rm -f .tox/.coverage.* 2>/dev/null || true"
commands =
# safety measure to assure we do not accidentally run tests with broken dependencies
Expand Down Expand Up @@ -83,6 +85,8 @@ deps =
setuptools>=51.1.1
pytest>=7.2.2 # to updated schemas
skip_install = true
commands_pre =
{[testenv]commands_pre}
commands =
{envpython} -m pre_commit run --all-files --show-diff-on-failure {posargs:}
passenv =
Expand Down Expand Up @@ -181,6 +185,8 @@ deps =
twine >= 4.0.1
skip_install = true
# Ref: https://twitter.com/di_codes/status/1044358639081975813
commands_pre =
{[testenv]commands_pre}
commands =
# build wheel and sdist using PEP-517
{envpython} -c 'import os.path, shutil, sys; \
Expand Down

0 comments on commit 1074122

Please sign in to comment.