Skip to content

Commit

Permalink
Support Python 3.12
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
ivanyu committed Jul 25, 2023
1 parent e73534d commit ba9b138
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr_and_main_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- check_and_test_pyheap_ui
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3

Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ dumper-docker-image:
(cd pyheap && $(MAKE) docker-image)

.PHONY: integration-tests
integration-tests: integration-tests-3-8 integration-tests-3-9 integration-tests-3-10 integration-tests-3-11
integration-tests: integration-tests-3-8 integration-tests-3-9 integration-tests-3-10 integration-tests-3-11 integration-tests-3-12

define run_integration_test
cd integration_tests && \
$(MAKE) "$2" && \
PYENV_VERSION="$1" poetry env use python && \
poetry run pip install -e ../pyheap-ui/ && \
poetry install && \
poetry run pytest -vv ./*.py
poetry run pytest -vv ./manual_test_e2e.py::test_e2e_target_docker_dumper_host
endef

.PHONY: integration-tests-3-8
Expand All @@ -53,3 +53,7 @@ integration-tests-3-10: pyheap/dist/pyheap_dump dumper-docker-image
.PHONY: integration-tests-3-11
integration-tests-3-11: pyheap/dist/pyheap_dump dumper-docker-image
$(call run_integration_test,3.11,test-target-docker-images-3-11)

.PHONY: integration-tests-3-12
integration-tests-3-12: pyheap/dist/pyheap_dump dumper-docker-image
$(call run_integration_test,3.12,test-target-docker-images-3-12)
7 changes: 7 additions & 0 deletions integration_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,12 @@ test-target-docker-images-3-11: e2e_docker/inferior-simple.py
$(call build_image,3.11,ubuntu,22.04)
$(call build_image,3.11,fedora,36)

.PHONY: test-target-docker-images-3-12
test-target-docker-images-3-12: e2e_docker/inferior-simple.py
$(call build_image,3.12,alpine,3.12-rc-alpine3.18)
$(call build_image,3.12,debian,3.12-rc-slim-bullseye)
$(call build_image,3.12,ubuntu,23.10)
$(call build_image,3.12,fedora,38)

e2e_docker/inferior-simple.py:
cp ../test_inferiors/inferior-simple.py $@
3 changes: 2 additions & 1 deletion integration_tests/manual_test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def test_e2e_target_host_dumper_host(test_heap_path: str) -> None:
_check_heap_file(test_heap_path)


@pytest.mark.parametrize("target_docker_base", ["alpine", "debian", "ubuntu", "fedora"])
# @pytest.mark.parametrize("target_docker_base", ["alpine", "debian", "ubuntu", "fedora"])
@pytest.mark.parametrize("target_docker_base", ["alpine"])
def test_e2e_target_docker_dumper_host(
target_docker_base: str, test_heap_path: str
) -> None:
Expand Down
8 changes: 4 additions & 4 deletions pyheap/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba9b138

Please sign in to comment.