mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2026-09-24 14:20:08 +01:00
github actions shared lib fix
This commit is contained in:
+4
-1
@@ -23,13 +23,16 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN uv sync
|
||||
|
||||
COPY github_actions_fix.sh ./
|
||||
RUN ./github_actions_fix.sh
|
||||
|
||||
COPY . .
|
||||
RUN cd .venv/lib/*/site-packages/seleniumbase/drivers && ln -s /usr/bin/chromedriver uc_driver
|
||||
|
||||
FROM base AS test
|
||||
|
||||
RUN uv sync --group test
|
||||
RUN . .venv/bin/activate && pytest --retries 2 -n auto --xvfb
|
||||
RUN ./test.sh
|
||||
|
||||
FROM base
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. .venv/bin/activate && python3 main.py
|
||||
if [ -f ld_fix.sh ]; then
|
||||
. ./ld_fix.sh
|
||||
fi
|
||||
|
||||
uv run main.py
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source .venv
|
||||
. .venv/bin/activate
|
||||
|
||||
# Fix for actions LD_LIBRARY_PATH env
|
||||
touch ld_fix.sh
|
||||
PYTHON_PATH=$(which python3)
|
||||
PYTHON_DIR=$(dirname $PYTHON_PATH)
|
||||
echo "export LD_LIBRARY_PATH=$PYTHON_DIR/../lib" >> ld_fix.sh
|
||||
echo "export PATH=$PYTHON_DIR:\$PATH" >> ld_fix.sh
|
||||
chmod +x ld_fix.sh
|
||||
Reference in New Issue
Block a user