Skip to content

Commit 57304fc

Browse files
committed
Minor tweaks to run integration tests in CI
1 parent c273112 commit 57304fc

File tree

6 files changed

+55
-26
lines changed

6 files changed

+55
-26
lines changed

.github/workflows/rust.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-20.04
1615
steps:
1716
- name: Check-out code

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
FROM python:3.10-bullseye
1+
FROM python:3.10-slim-bullseye
22

33
# Install Rust
4+
RUN apt update && apt install -y curl pkg-config libssl-dev build-essential
45
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
56
ENV PATH="/root/.cargo/bin:${PATH}"
67
RUN rustup toolchain install nightly
78

89
# Install poetry
910
RUN pip install poetry
10-
ENV PATH="${PATH}:/{$HOME}/.local/bin"
11+
ENV PATH="${PATH}:/root/.local/bin"
1112
RUN poetry config virtualenvs.in-project true
1213

1314
# Install Solana Tool Suite
1415
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.14.11/install)"
16+
ENV PATH="${PATH}:/root/.local/share/solana/install/active_release/bin"
1517

1618
ADD . /agent
1719
WORKDIR /agent
1820

19-
RUN apt update && apt install -y pkg-config libssl-dev
2021
RUN cargo build --release

integration-tests/poetry.lock

Lines changed: 46 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-tests/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ program-admin = { git = "https://github.com/pyth-network/program-admin.git", bra
1414
pytest = "^7.2"
1515
pytest-asyncio = "^0.18.3"
1616
pre-commit = "^2.21.0"
17+
jsonrpc_websocket = "^3.1.4"
1718

1819
[build-system]
1920
requires = ["poetry-core"]

integration-tests/tests/test_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,13 @@ def agent_keystore(self, agent_keystore_path, agent_publish_keypair):
300300
@pytest.fixture
301301
def agent(self, sync_accounts, agent_keystore, tmp_path):
302302
LOGGER.debug("Building agent binary")
303-
self.run("cargo build")
303+
self.run("cargo build --release")
304304

305305
log_dir = os.path.join(tmp_path, "agent_logs")
306306
LOGGER.debug("Launching agent logging to %s", log_dir)
307307

308308
os.environ["RUST_BACKTRACE"] = "full"
309-
with self.spawn("../target/debug/agent --config agent_conf.toml", log_dir=log_dir):
309+
with self.spawn("../target/release/agent --config agent_conf.toml", log_dir=log_dir):
310310
time.sleep(3)
311311
yield
312312

tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ cargo test --workspace
55

66
# Run Python integration tests
77
cd integration-tests
8-
pytest -s --log-cli-level=debug
8+
poetry install
9+
poetry run pytest -s --log-cli-level=debug

0 commit comments

Comments
 (0)