Selenium Docker Actions

This commit is contained in:
Thomas Suckow
2021-01-07 21:43:58 -08:00
parent 2db939ba6a
commit 32c3eb3a0e
5 changed files with 27 additions and 8 deletions
+1 -7
View File
@@ -31,12 +31,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.101
- name: Build
run: dotnet publish -r linux-x64 -o publish/ Duplicati.sln
- name: Selenium
run: docker images
run: pipeline/selenium/test.sh
+1 -1
View File
@@ -74,7 +74,7 @@ driver.implicitly_wait(10)
driver.get("http://localhost:8200/ngax/index.html")
if "Duplicati" not in driver.title:
raise Exception("Unable to load duplicati GUI!")
raise Exception("Unable to load duplicati GUI! Got: " + driver.title)
# Create and hash random files in the source folder
write_random_file(1024 * 1024, SOURCE_FOLDER + os.sep + "1MB.test")
+10
View File
@@ -0,0 +1,10 @@
FROM selenium/standalone-firefox
ENV DEBIAN_FRONTEND=noninteractive
RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O ~/packages-microsoft-prod.deb
RUN sudo dpkg -i ~/packages-microsoft-prod.deb
RUN sudo apt-get update && sudo apt-get install -y python3-pip rsync dotnet-sdk-5.0
RUN pip3 install selenium
ADD runner.sh /
CMD /runner.sh
+9
View File
@@ -0,0 +1,9 @@
mkdir /home/seluser/published/
chmod +S /home/seluser/published/
sudo dotnet publish -o /home/seluser/published/ /sources/Duplicati.sln
cd
AUTOUPDATER_Duplicati_SKIP_UPDATE=1 "/home/seluser/published/Duplicati.Server" &
timeout 240 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; echo Checking if server started...; done' 127.0.0.1 8200
echo Running Tests...
python3 /sources/guiTests/guiTest.py
+6
View File
@@ -0,0 +1,6 @@
SCRIPTDIR=$( cd "$(dirname "$0")" ; pwd -P )
docker build $SCRIPTDIR/docker -t duplicati-selenium
export MSYS_NO_PATHCONV=1
docker run --rm -v $SCRIPTDIR/../../:/sources duplicati-selenium