From 880194d0214e215008e45c899d26c3eded57e0a9 Mon Sep 17 00:00:00 2001 From: Luke Brody Date: Wed, 14 Aug 2024 23:01:13 -0700 Subject: [PATCH] Optimizination attempt #1 --- .github/workflows/check.yml | 2 ++ react/test/Dockerfile | 13 ++++--------- test-ci.sh | 7 +++---- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7d55fc3f5..e2912f07c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -55,4 +55,6 @@ jobs: container: image: ghcr.io/${{ needs.build-and-push-image.outputs.image_tag }} steps: + - uses: actions/checkout@v4 + - run: git clone --progress --depth 1 https://github.com/densitydb/densitydb.github.io.git /density-db - run: /urbanstats/test-ci.sh diff --git a/react/test/Dockerfile b/react/test/Dockerfile index 2b77a2e8a..8ed3bfc85 100644 --- a/react/test/Dockerfile +++ b/react/test/Dockerfile @@ -1,25 +1,20 @@ FROM ubuntu:22.04 FROM node:20 +RUN dpkg --add-architecture i386 RUN apt-get -y update RUN apt-get -y install python3-pip RUN apt-get -y install libgdal-dev -WORKDIR /urbanstats -COPY ./requirements.txt ./ -RUN pip3 install --break-system-packages -r requirements.txt - RUN apt-get -y install chromium RUN apt-get -y install xvfb -RUN git clone --progress --depth 1 https://github.com/densitydb/densitydb.github.io.git ../density-db - # needed for window resizing in Testcafe -RUN dpkg --add-architecture i386 -RUN apt-get -y update RUN apt-get -y install libc6:i386 RUN apt-get -y install libx11-6:i386 RUN apt-get -y install fluxbox -COPY ./ ./ +COPY ./requirements.txt ./ +RUN pip3 install --break-system-packages -r requirements.txt + ENTRYPOINT [ "/bin/bash" ] \ No newline at end of file diff --git a/test-ci.sh b/test-ci.sh index 953e3329c..f2e606286 100755 --- a/test-ci.sh +++ b/test-ci.sh @@ -3,16 +3,15 @@ set -e -cd /urbanstats +echo "GITHUB_WORKSPACE $GITHUB_WORKSPACE" -pushd ../density-db -git fetch --depth 1 origin # cloned in docker +cd /density-db git checkout origin git checkout origin/$BRANCH_NAME || true # Checkout the same branch name on the remote, if it exists. BRANCH_NAME defined in workflow env python3 -m http.server & -popd +cd $GITHUB_WORKSPACE python3 create_website.py ../density-db --no-data --no-geo --no-juxta # Start display subsystem to browser can run