Skip to content

Commit d5f1ebc

Browse files
committed
add pytest, update python path, run python tests
1 parent f3b4803 commit d5f1ebc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docker/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG SOLANA_VERSION
33
FROM solanalabs/solana:v${SOLANA_VERSION}
44

55
RUN apt-get update
6-
RUN apt-get install -y cmake curl g++ gcc-multilib git libzstd1 libzstd-dev sudo zlib1g zlib1g-dev
6+
RUN apt-get install -y cmake curl g++ gcc-multilib git libzstd1 libzstd-dev python3-pytest sudo zlib1g zlib1g-dev
77

88
# Grant sudo access to pyth user
99
RUN echo "pyth ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
@@ -16,7 +16,11 @@ COPY --chown=pyth:pyth ${GITHUB_WORKSPACE} pyth-client/
1616

1717
RUN cd pyth-client && mkdir build && cd build && cmake .. && make && ctest
1818

19-
RUN echo "\nexport PATH=\$PATH:$HOME/pyth-client/build" >> .bashrc
19+
RUN echo "\nexport PATH=\$PATH:\$HOME/pyth-client/build" >> .profile
20+
21+
RUN echo "\nexport PYTHONPATH=\${PYTHONPATH:+\${PYTHONPATH}:}\$HOME/pyth-client" >> .profile
22+
23+
RUN /bin/bash -l -c "pytest-3 --pyargs pyth"
2024

2125
# Install Rust
2226
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none

0 commit comments

Comments
 (0)