diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8fce58..1485353 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/tests/test_cnes_sonar_scanner.py b/tests/test_cnes_sonar_scanner.py index 214b19e..e56f882 100644 --- a/tests/test_cnes_sonar_scanner.py +++ b/tests/test_cnes_sonar_scanner.py @@ -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}",