Skip to content

Commit

Permalink
Comment out safety tests and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rickybassom committed Dec 28, 2023
1 parent a562d0b commit 43be01d
Show file tree
Hide file tree
Showing 5 changed files with 865 additions and 726 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip==22.1.2
nox==2022.1.7
nox-poetry==1.0.2
poetry==1.1.13
virtualenv==20.15.0
pip==22.1.3
nox==2023.4.22
nox-poetry==1.0.3
poetry==1.7.1
virtualenv==20.25.0
12 changes: 2 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
include:
- { python: "3.10", os: "ubuntu-latest", session: "lint" }
- { python: "3.10", os: "ubuntu-latest", session: "safety" }
# - { python: "3.10", os: "ubuntu-latest", session: "safety" }
- { python: "3.10", os: "ubuntu-latest", session: "mypy" }
- { python: "3.9", os: "ubuntu-latest", session: "mypy" }
- { python: "3.8", os: "ubuntu-latest", session: "mypy" }
Expand All @@ -40,9 +40,6 @@ jobs:
- name: Install Poetry
shell: bash
run: |
if [ "${{ matrix.os }}" = "macos-latest" ]; then
pip install --upgrade pip six
fi
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
poetry --version
Expand All @@ -64,12 +61,7 @@ jobs:
if [ "${{ matrix.os }}" = "windows-latest" ]; then
export SETUPTOOLS_USE_DISTUTILS=stdlib
fi
if [ "${{ matrix.session }}" = "safety" ]; then
nox --python=${{ matrix.python }} || true
else
nox --python=${{ matrix.python }}
fi
nox --python=${{ matrix.python }}
- name: Upload coverage data
if: always() && matrix.session == 'unit-tests'
Expand Down
20 changes: 10 additions & 10 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
python_versions = ["3.10", "3.9", "3.8", "3.7"]
nox.needs_version = ">= 2021.6.6"
nox.options.sessions = (
"safety",
# "safety",
"lint",
"mypy",
"unit-tests",
Expand All @@ -32,15 +32,15 @@
)


@session(python="3.10")
def safety(session: Session) -> None:
"""Scan dependencies for insecure packages."""
requirements = session.poetry.export_requirements()
session.install("safety")

ignore_ids = [44715, 44716, 44717] # numpy CVE-2021-41495
ignored = [f"--ignore={ignore_id}" for ignore_id in ignore_ids]
session.run("safety", "check", "--full-report", f"--file={requirements}", *ignored)
# @session(python="3.10")
# def safety(session: Session) -> None:
# """Scan dependencies for insecure packages."""
# requirements = session.poetry.export_requirements()
# session.install("safety")
#
# ignore_ids = [44715, 44716, 44717] # numpy CVE-2021-41495
# ignored = [f"--ignore={ignore_id}" for ignore_id in ignore_ids]
# session.run("safety", "check", "--full-report", f"--file={requirements}", *ignored)


@session(python="3.10")
Expand Down
Loading

0 comments on commit 43be01d

Please sign in to comment.