Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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; \
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 "$@"
Loading