Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add python 3.12 build #5388

Merged
merged 16 commits into from
Nov 21, 2023
Merged
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -68,7 +68,7 @@ jobs:
# remove venv, if exists
pipenv --rm || true
pipenv --python ${{ matrix.python }}
pipenv run pip install pytest pytest-xdist
pipenv run pip install pytest pytest-xdist setuptools wheel
pipenv run python setup.py sdist bdist_wheel
bash -c 'pipenv run pip install dist/checkov-*.whl'
- name: Clone Terragoat - vulnerable terraform
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python: ["3.8", "3.11"]
python: ["3.8", "3.12"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
continue-on-error: true # for now it is ok to fail
Expand All @@ -142,7 +142,7 @@ jobs:
# remove venv, if exists
pipenv --rm || true
pipenv --python ${{ matrix.python }}
pipenv run pip install pytest pytest-xdist
pipenv run pip install pytest pytest-xdist setuptools wheel
pipenv run python setup.py sdist bdist_wheel
bash -c 'pipenv run pip install dist/checkov-*.whl'
- name: Clone flask - Python repo for SAST
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand All @@ -63,6 +63,7 @@ jobs:
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
cache: "pipenv"
cache-dependency-path: "Pipfile.lock"
- uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
Expand All @@ -79,7 +80,14 @@ jobs:
# remove venv, if exists
pipenv --rm || true
pipenv --python ${{ matrix.python }}
pipenv install --dev -v

if [ '${{ matrix.python }}' == '3.12' ]; then
# needed for numpy
pipenv install --skip-lock --dev -v
else
pipenv install --dev -v
fi

pipenv run pip install redefine --index-url https://pip.redefine.dev
- name: Unit tests
env:
Expand All @@ -94,14 +102,15 @@ jobs:
strategy:
fail-fast: true
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
cache: "pipenv"
cache-dependency-path: "Pipfile.lock"
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
Expand All @@ -116,11 +125,12 @@ jobs:
run: |
python -m pip install --no-cache-dir --upgrade pipenv
- name: Build & install checkov package
shell: bash
run: |
# remove venv, if exists
pipenv --rm || true
pipenv --python ${{ matrix.python }}
pipenv run pip install pytest pytest-xdist
pipenv run pip install pytest pytest-xdist setuptools wheel
pipenv run python setup.py sdist bdist_wheel
bash -c 'pipenv run pip install dist/checkov-*.whl'
- name: Clone Terragoat - vulnerable terraform
Expand All @@ -146,14 +156,15 @@ jobs:
strategy:
fail-fast: true
matrix:
python: ["3.8", "3.11"]
python: ["3.8", "3.12"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
cache: "pipenv"
cache-dependency-path: "Pipfile.lock"
- name: Install pipenv
Expand All @@ -164,7 +175,7 @@ jobs:
# remove venv, if exists
pipenv --rm || true
pipenv --python ${{ matrix.python }}
pipenv run pip install pytest pytest-xdist
pipenv run pip install pytest pytest-xdist setuptools wheel
pipenv run python setup.py sdist bdist_wheel
bash -c 'pipenv run pip install dist/checkov-*.whl'
- name: Clone flask - Python repo for SAST
Expand All @@ -191,14 +202,15 @@ jobs:
strategy:
fail-fast: true
matrix:
python: ["3.8", "3.11"]
python: ["3.8", "3.12"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
cache: "pipenv"
cache-dependency-path: "Pipfile.lock"
- name: Install pipenv
Expand All @@ -209,7 +221,7 @@ jobs:
# remove venv, if exists
pipenv --rm || true
pipenv --python ${{ matrix.python }}
pipenv run pip install pytest pytest-xdist
pipenv run pip install pytest pytest-xdist setuptools wheel
pipenv run python setup.py sdist bdist_wheel
bash -c 'pipenv run pip install dist/checkov-*.whl'
- name: Create checkov reports
Expand Down
3 changes: 1 addition & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pytest-xdist = "*"
pytest-asyncio = "*"
pytest-cov = "*"
pytest-mock = "*"
mock = "*"
coverage ="==5.5"
coverage-badge = "*"
bandit = "*"
Expand All @@ -36,7 +35,7 @@ dlint = "*"
mypy = "*"
flake8-bugbear = "*"
parameterized = "*"
freezegun = "*"
time-machine = "*"
boto3-stubs-lite = {extras = ["s3"], version = "*"}

[packages]
Expand Down
Loading