Skip to content

Commit af22be3

Browse files
authored
Merge branch 'master' into enhancement/option-to-save-tx-cbor
2 parents 4eaefef + 1f6e8af commit af22be3

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

.github/actions/tests/run-e2e-tests/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ runs:
104104
echo "Running tests via docker exec"
105105
docker exec tests bash -c "
106106
cd /e2e-tests &&
107-
source venv/bin/activate &&
107+
source .venv/bin/activate &&
108108
$pytest_cmd
109109
"
110110
else
111111
echo "Running tests locally"
112112
cd e2e-tests
113-
source venv/bin/activate
113+
source .venv/bin/activate
114114
eval "$pytest_cmd"
115115
fi
116116
env:

.github/actions/tests/setup-python/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@ runs:
1919
run: |
2020
cd e2e-tests
2121
curl -L --silent https://github.com/getsops/sops/releases/download/v3.7.3/sops_3.7.3_amd64.deb > sops.deb && sudo dpkg -i sops.deb && rm sops.deb
22-
python -m venv venv
23-
source venv/bin/activate
24-
pip install -r requirements.txt
25-
cd ..
22+
nix develop
2623
shell: bash

dev/local-environment/configurations/tests/entrypoint.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -ex # Exit on any error, print commands
23

34
# Verify the e2e-tests directory exists and cd into it
45
if [ -d "/e2e-tests" ]; then
@@ -26,11 +27,17 @@ rm /tmp/sops.deb
2627
apt-get clean
2728
rm -rf /var/lib/apt/lists/*
2829

29-
# 5) Create and initialize the virtual environment
30-
python -m venv venv
31-
source venv/bin/activate
32-
pip install --upgrade pip
33-
pip install -r requirements.txt
30+
# 5) Install uv and sync dependencies
31+
curl -LsSf https://astral.sh/uv/install.sh | sh
32+
export PATH="/root/.local/bin:$PATH"
33+
echo "uv version: $(uv --version)"
34+
echo "Creating virtual environment with uv sync..."
35+
uv sync --verbose
36+
echo "Virtual environment created at: $(pwd)/.venv"
37+
ls -la .venv/bin/
38+
39+
set +x # Stop printing commands
40+
echo "===== Environment setup complete ====="
3441

3542
# Keep the container running
3643
tail -f /dev/null

e2e-tests/Earthfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ VERSION 0.7
22
FROM python:3.12
33
WORKDIR /test
44

5-
COPY --dir ./config ./secrets ./tests ./src ./requirements.txt ./pytest.ini ./tox.ini .
5+
COPY --dir ./config ./secrets ./tests ./src ./pytest.ini ./tox.ini .
6+
COPY pyproject.toml uv.lock .
67

78
ARG AWS_DEFAULT_REGION=eu-central-1
89
ARG blockchain=substrate
@@ -47,7 +48,9 @@ build:
4748
RUN kubectl config set-context my-context --cluster=my-cluster --user=github-actions --namespace=default
4849
RUN kubectl config use-context my-context
4950
RUN curl -L --silent https://github.com/getsops/sops/releases/download/v3.7.3/sops_3.7.3_${USERARCH}.deb > sops.deb && dpkg -i sops.deb && rm sops.deb
50-
RUN pip install -r requirements.txt
51+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
52+
ENV PATH="/root/.local/bin:$PATH"
53+
RUN uv sync
5154

5255
test:
5356
# ATTENTION! +test target saves exit code to a file and returns success even when tests fail.
@@ -56,9 +59,9 @@ test:
5659
FROM +build
5760
ARG CI_RUN
5861
IF [ "$CI_RUN" = "true" ]
59-
RUN --secret AWS_SECRET_ACCESS_KEY --secret AWS_ACCESS_KEY_ID --secret AWS_SESSION_TOKEN --no-cache eval $pytest_cmd --ci-run || true
62+
RUN --secret AWS_SECRET_ACCESS_KEY --secret AWS_ACCESS_KEY_ID --secret AWS_SESSION_TOKEN --no-cache source .venv/bin/activate && eval $pytest_cmd --ci-run || true
6063
ELSE
61-
RUN --mount=type=secret,target=/root/.aws/credentials,id=aws --mount=type=secret,target=/root/.kube/config,id=kube --no-cache eval $pytest_cmd || true
64+
RUN --mount=type=secret,target=/root/.aws/credentials,id=aws --mount=type=secret,target=/root/.kube/config,id=kube --no-cache source .venv/bin/activate && eval $pytest_cmd || true
6265
END
6366

6467
test-artifacts:

0 commit comments

Comments
 (0)