From d5e5380dbc4437e230d2bb8bf05baf97eeb13053 Mon Sep 17 00:00:00 2001 From: DangerChamp <77676230+DangerChamp@users.noreply.github.com> Date: Wed, 21 Dec 2022 20:42:15 +0000 Subject: [PATCH 1/3] ci: remove pdf tests from windows short tests Removes pdf tests from windows short tests --- .github/workflows/testing.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a3b6b71248..e9cfec8a4e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -370,31 +370,6 @@ jobs: test/test_cvedb.py - name: Run HTML tests run: pytest -v -n auto test/test_html.py - - name: Cache conda - uses: actions/cache@v3 - env: - # Increase to reset cache if requirements.txt file has not changed - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ - hashFiles('requirements.txt') }} - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - activate-environment: pdftotext - use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! - - name: Install pdftotext, reportlab and cve-bin-tool - run: | - conda install -c conda-forge python=3.9 poppler pdftotext - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install --upgrade wheel - python -m pip install --upgrade reportlab - python -m pip install --upgrade -r dev-requirements.txt - python -m pip install --upgrade . - - name: Test PDF generation on Windows - run: pytest test/test_output_engine.py -k test_output_pdf --cov --cov-append --cov-report=xml - name: Upload code coverage to codecov uses: codecov/codecov-action@v3 with: From 4b1042caf42cf49a472d677f513d879c273c8954 Mon Sep 17 00:00:00 2001 From: DangerChamp <77676230+DangerChamp@users.noreply.github.com> Date: Thu, 22 Dec 2022 10:26:54 +0000 Subject: [PATCH 2/3] ci: Fixed my mistake of removing for long tests instead of short tests --- .github/workflows/testing.yml | 46 ++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e9cfec8a4e..66e579b425 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -294,31 +294,14 @@ jobs: test/test_cvedb.py - name: Run HTML tests run: pytest -v -n auto test/test_html.py - - name: Cache conda - uses: actions/cache@v3 - env: - # Increase to reset cache if requirements.txt file has not changed - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ - hashFiles('requirements.txt') }} - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - activate-environment: pdftotext - use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! - - name: Install pdftotext, reportlab and cve-bin-tool + - name: Install reportlab and cve-bin-tool run: | - conda install -c conda-forge python=3.10 poppler pdftotext python -m pip install --upgrade pip python -m pip install --upgrade setuptools python -m pip install --upgrade wheel python -m pip install --upgrade reportlab python -m pip install --upgrade -r dev-requirements.txt python -m pip install --upgrade . - - name: Test PDF generation on Windows - run: pytest test/test_output_engine.py -k test_output_pdf windows_long_tests: name: Windows long tests @@ -370,10 +353,35 @@ jobs: test/test_cvedb.py - name: Run HTML tests run: pytest -v -n auto test/test_html.py + - name: Cache conda + uses: actions/cache@v3 + env: + # Increase to reset cache if requirements.txt file has not changed + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ + hashFiles('requirements.txt') }} + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + activate-environment: pdftotext + use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! + - name: Install pdftotext, reportlab and cve-bin-tool + run: | + conda install -c conda-forge python=3.9 poppler pdftotext + python -m pip install --upgrade pip + python -m pip install --upgrade setuptools + python -m pip install --upgrade wheel + python -m pip install --upgrade reportlab + python -m pip install --upgrade -r dev-requirements.txt + python -m pip install --upgrade . + - name: Test PDF generation on Windows + run: pytest test/test_output_engine.py -k test_output_pdf --cov --cov-append --cov-report=xml - name: Upload code coverage to codecov uses: codecov/codecov-action@v3 with: files: ./coverage.xml flags: win-longtests name: codecov-umbrella - fail_ci_if_error: false + fail_ci_if_error: false \ No newline at end of file From c4cb95c12838449d2f8a58b3864c2a8dd10638df Mon Sep 17 00:00:00 2001 From: DangerChamp <77676230+DangerChamp@users.noreply.github.com> Date: Thu, 22 Dec 2022 20:41:44 +0000 Subject: [PATCH 3/3] ci: Deleted extra pip install lines --- .github/workflows/testing.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 66e579b425..41df85d79f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -294,14 +294,6 @@ jobs: test/test_cvedb.py - name: Run HTML tests run: pytest -v -n auto test/test_html.py - - name: Install reportlab and cve-bin-tool - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install --upgrade wheel - python -m pip install --upgrade reportlab - python -m pip install --upgrade -r dev-requirements.txt - python -m pip install --upgrade . windows_long_tests: name: Windows long tests