Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate runner install/update #3918 #3920

Merged
merged 1 commit into from
Jan 30, 2025
Merged
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
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[project]
name = 'system_tests'
version = '0.0.1'
dynamic = ["dependencies"]

[tool.setuptools]
packages = ["tests", "utils", "manifests"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.pytest.ini_options]
addopts = "--json-report --json-report-indent=2 --color=yes --no-header --junitxml=reportJunit.xml -r Xf"
testpaths = [
5 changes: 5 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -328,6 +328,11 @@ function main() {
run_mode='direct'
fi

# check if runner is installed and up to date
if [[ "${run_mode}" == "direct" ]] && ! is_using_nix && ! diff requirements.txt venv/requirements.txt; then
./build.sh -i runner
fi

# ensure environment
if [[ "${run_mode}" == "docker" ]] || is_using_nix; then
: # no venv needed
6 changes: 4 additions & 2 deletions utils/build/build.sh
Original file line number Diff line number Diff line change
@@ -155,9 +155,11 @@ build() {
fi
fi
source venv/bin/activate
python -m pip install --upgrade pip wheel
python -m pip install --upgrade pip setuptools==75.8.0
fi
pip install -r requirements.txt
python -m pip install -e .
cp requirements.txt venv/requirements.txt


elif [[ $IMAGE_NAME == runner ]] && [[ $DOCKER_MODE == 1 ]]; then
docker buildx build \
4 changes: 3 additions & 1 deletion utils/build/docker/runner.Dockerfile
Original file line number Diff line number Diff line change
@@ -3,8 +3,11 @@ FROM python:3.12
RUN mkdir /app
WORKDIR /app

RUN mkdir tests/ manifests/

COPY utils/build/docker/python/parametric/requirements.txt utils/build/docker/python/parametric/requirements.txt
COPY requirements.txt .
COPY pyproject.toml .
COPY build.sh .
COPY utils/build/build.sh utils/build/build.sh
RUN mkdir -p /app/utils/build/docker && ./build.sh -i runner
@@ -21,7 +24,6 @@ COPY manifests /app/manifests

# toplevel things
COPY conftest.py /app/
COPY pyproject.toml /app/
COPY run.sh /app/

CMD ./run.sh