diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d64424b..5b56156 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,14 +7,6 @@ on: branches: [main] workflow_dispatch: {} jobs: - build-37: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Run unit tests - run: docker build . --target=test --build-arg PYTHON_VERSION=${PYTHON_VERSION} - env: - PYTHON_VERSION: "3.7" build-38: runs-on: ubuntu-latest steps: @@ -47,6 +39,14 @@ jobs: run: docker build . --target=test --build-arg PYTHON_VERSION=${PYTHON_VERSION} env: PYTHON_VERSION: "3.11" + build-312: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run unit tests + run: docker build . --target=test --build-arg PYTHON_VERSION=${PYTHON_VERSION} + env: + PYTHON_VERSION: "3.12" # Builds to validate alternate versions of protobuf build-38-pb319: diff --git a/Dockerfile b/Dockerfile index 957176c..0ab95c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ ARG PROTOBUF_VERSION="" WORKDIR /src # Install build, test, and publish dependencies +# Test requirements are installed first in case they have to be overwritten COPY requirements.txt requirements_test.txt /src/ RUN true && \ apt-get update -y && \ @@ -19,8 +20,8 @@ RUN true && \ apt-get autoremove --yes && \ pip install pip --upgrade && \ pip install twine pre-commit && \ - pip install -r /src/requirements.txt && \ pip install -r /src/requirements_test.txt && \ + pip install -r /src/requirements.txt && \ if [ "$PROTOBUF_VERSION" != "" ]; then \ pip uninstall -y protobuf grpcio-tools && \ pip install "protobuf${PROTOBUF_VERSION}" grpcio-tools; \ diff --git a/requirements.txt b/requirements.txt index fca3667..54fe413 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ +alchemy-logging>=1.0.3 +grpcio>=1.46.3,<1.68.0 # NOTE: protobuf 3.19 is the highest version allowed by tensorflow (currently), # so we explicitly pin the lower bound to allow compatibility with tf protobuf>=3.19.0,<5 -alchemy-logging>=1.0.3 typing-extensions>=4.5.0,<5; python_version < '3.9' diff --git a/requirements_test.txt b/requirements_test.txt index 22b4356..d8b7d30 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -5,4 +5,4 @@ pytest-xdist>=2.5.0 tls_test_tools>=0.1.1 # Round-trip proto compilation -grpcio-tools>=1.46.3 +grpcio-tools>=1.46.3,<1.68.0 diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 297d6d0..49c71d8 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -20,6 +20,7 @@ else procs_arg="" fi +# Ignore `google.protobuf.service module is deprecated` UserWarning for now FAIL_THRESH=100.0 python3 -m pytest \ $procs_arg \ @@ -28,4 +29,5 @@ python3 -m pytest \ --cov-report=term \ --cov-report=html \ --cov-fail-under=$FAIL_THRESH \ - -W error "$@" + -W error -W ignore::PendingDeprecationWarning \ + -W ignore::UserWarning "$@"