mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
CI: New Docker tests for Python with numpy (#5677)
* New Docker tests for Python with numpy * print numpy status in test suite
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
FROM python:2.7.15-slim-stretch as base
|
||||
WORKDIR /code
|
||||
ADD . .
|
||||
RUN cp flatc_debian_stretch flatc
|
||||
WORKDIR /code/tests
|
||||
RUN python --version
|
||||
RUN pip install numpy
|
||||
RUN pip install coverage
|
||||
RUN ./PythonTest.sh
|
||||
@@ -0,0 +1,9 @@
|
||||
FROM python:3.7.1-slim-stretch as base
|
||||
WORKDIR /code
|
||||
ADD . .
|
||||
RUN cp flatc_debian_stretch flatc
|
||||
WORKDIR /code/tests
|
||||
RUN python --version
|
||||
RUN pip install numpy
|
||||
RUN pip install coverage
|
||||
RUN ./PythonTest.sh
|
||||
@@ -2368,6 +2368,13 @@ def main():
|
||||
|
||||
kwargs = dict(argv=sys.argv[:-3])
|
||||
|
||||
# show whether numpy is present, as it changes the test logic:
|
||||
try:
|
||||
import numpy
|
||||
print('numpy available')
|
||||
except ImportError:
|
||||
print('numpy not available')
|
||||
|
||||
# run tests, and run some language comparison checks if needed:
|
||||
success = backward_compatible_run_tests(**kwargs)
|
||||
if success and os.environ.get('COMPARE_GENERATED_TO_GO', 0) == "1":
|
||||
|
||||
Reference in New Issue
Block a user