ci/cd fix permissions issue in test core linux + fix shenanigans with antibot linux core tests

This commit is contained in:
Théophile Diot 2023-09-19 11:27:10 +02:00
parent 43b1a038f9
commit d59cf1835d
No known key found for this signature in database
GPG Key ID: 248FEA4BAE400D06
2 changed files with 5 additions and 4 deletions

View File

@ -29,7 +29,7 @@ jobs:
sudo apt install --no-install-recommends -y nodejs tar wget curl grep libappindicator3-1 libasound2 libdbus-glib-1-2 libxtst6 libxt6
wget -O firefox-setup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64"
tar xjf firefox-setup.tar.bz2 -C /opt/
ln -s /opt/firefox/firefox /usr/bin/firefox
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
rm -f firefox-setup.tar.bz2
- name: Download geckodriver
uses: nick-fields/retry@v2

View File

@ -40,6 +40,8 @@ cleanup_stack () {
else
sed -i 's@USE_ANTIBOT=.*$@USE_ANTIBOT=no@' /etc/bunkerweb/variables.env
sed -i 's@ANTIBOT_URI=.*@ANTIBOT_URI=/challenge@' /etc/bunkerweb/variables.env
unset USE_ANTIBOT
unset ANTIBOT_URI
fi
if [[ $end -eq 1 && $exit_code = 0 ]] ; then
return
@ -75,6 +77,7 @@ do
find . -type f -name 'docker-compose.*' -exec sed -i 's@ANTIBOT_URI: ".*"@ANTIBOT_URI: "/custom"@' {} \;
else
sed -i 's@ANTIBOT_URI=.*@ANTIBOT_URI=/custom@' /etc/bunkerweb/variables.env
export ANTIBOT_URI="/custom"
fi
elif [ "$test" != "deactivated" ] ; then
echo "🤖 Running tests with antibot \"$test\" ..."
@ -82,6 +85,7 @@ do
find . -type f -name 'docker-compose.*' -exec sed -i 's@USE_ANTIBOT: ".*"$@USE_ANTIBOT: "'"${test}"'"@' {} \;
else
sed -i 's@USE_ANTIBOT=.*$@USE_ANTIBOT='"${test}"'@' /etc/bunkerweb/variables.env
export USE_ANTIBOT="${test}"
fi
fi
@ -156,9 +160,6 @@ do
if [ "$integration" == "docker" ] ; then
docker compose -f docker-compose.test.yml up --abort-on-container-exit --exit-code-from tests
else
set -a
source /etc/bunkerweb/variables.env
set +a
python3 main.py
fi