From 2575101fcfa7ea2e96b2aec638ff5da12a0b8c03 Mon Sep 17 00:00:00 2001 From: Aurelien Gateau Date: Fri, 5 May 2023 13:44:19 +0200 Subject: [PATCH] chore: clean up --- .github/workflows/main.yml | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc32d4e59c..ebcaf0177c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,24 +80,13 @@ jobs: python -m pip install --upgrade pip python -m pip install --upgrade pipenv==2022.10.4 pipenv install --system --dev - - pip show urllib3 - python -c "import urllib3 ; print(urllib3.__version__) ; print(urllib3.__file__)" - + # Hack: workaround urllib3 still being installed on windows-2022 builder pip install --force-reinstall 'urllib3<2' - - pip show urllib3 - python -c "import urllib3 ; print(urllib3.__version__) ; print(urllib3.__file__)" - - python -c "import vcr" - - name: Install Windows dev dependencies if: matrix.os == 'windows-2022' run: | # Those are win32-only dependencies from pytest python -m pip install atomicwrites colorama - pip freeze | grep urllib - python -c "import vcr" - name: Override base Docker image used for functional tests on Windows if: matrix.os == 'windows-2022' @@ -109,20 +98,26 @@ jobs: - name: Ensure a clean package installation run: | - python -c 'import sys ; print(sys.executable)' pip install wheel check-wheel-contents - pip freeze | grep urllib python setup.py clean --all bdist_wheel # The created wheel (.whl) file will be found and analyzed within the `dist/` folder check-wheel-contents dist/ - pip freeze | grep urllib - python -c "import vcr" - name: Run unit tests run: | - pip freeze | grep urllib - pytest --disable-pytest-warnings --disable-socket tests/unit - python -c "import vcr" + coverage run --source ggshield -m pytest --disable-pytest-warnings --disable-socket tests/unit + + - name: Gather coverage report + run: | + coverage report --fail-under=80 + coverage xml + + - uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: false - name: Run functional tests # See note about steps requiring the GITGUARDIAN_API at the top of this file