Skip to content

Commit

Permalink
added debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
Topin2001 committed Jun 17, 2024
1 parent f5e9d73 commit 32a9ac7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,5 @@ jobs:
echo "Testing the scanner image..."
echo -e "Results of the CI pipeline\n" > tests_logs.txt
cd tests/
python3 -m pip install -r requirements.txt
python3 -m pytest -v -s |& tee -a ../tests_logs.txt
# Have the job fail if at least one test failed
- name: Check all tests passed
run: grep -v -q "FAILED" tests_logs.txt
pip install -r requirements.txt
pytest -v -s
2 changes: 2 additions & 0 deletions tests/test_cnes_sonar_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def analyse_project():
:returns: output of the analysis
"""
#Print the output of docker ps -a with the container name to help debugging
print(docker_client.containers.list(all=True, filters={"name": cls.SONARQUBE_CONTAINER_NAME}))
print(f"Analysing project {project_key}...")
output = docker_client.containers.run(cls._SONAR_SCANNER_IMAGE,
f"-Dsonar.projectBaseDir=/usr/src/tests/{folder} -Dsonar.login={cls.SONARQUBE_TOKEN}",
Expand Down

0 comments on commit 32a9ac7

Please sign in to comment.