-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt smoke testing to test both molecule and ansible-lint
- Loading branch information
Showing
2 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
for PROJECT in ansible-lint molecule; do | ||
echo "Running tests for $PROJECT" | ||
if [[ -d "${TOX_ENV_DIR}/${PROJECT}/.git" ]]; then | ||
git -C "${TOX_ENV_DIR}/${PROJECT}" pull | ||
else | ||
mkdir -p "${TOX_ENV_DIR}/${PROJECT}" | ||
git clone --recursive https://github.com/ansible/${PROJECT} "${TOX_ENV_DIR}/${PROJECT}" | ||
fi | ||
pushd "${TOX_ENV_DIR}/${PROJECT}" > /dev/null | ||
tox devenv | ||
source venv/bin/activate | ||
uv pip install -e "$SCRIPT_DIR/.." | ||
uv pip freeze | grep "file:" | ||
pytest | ||
popd | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters