test: start work on Pale Moon tests

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-07-24 09:32:16 -04:00
parent 21f570962c
commit 7d60a0a77a
12 changed files with 88 additions and 0 deletions

14
test/palemoon/Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM golang:alpine AS build
RUN go install github.com/mattn/goreman@latest
FROM debian:latest AS run
RUN apt-get update -y && \
apt-get install -y tigervnc-standalone-server dwm xterm && \
rm -rf /var/lib/apt/lists
ENV VNC_DESKTOP_NAME="Xtigervnc"
ENV VNC_GEOMETRY=1280x800
COPY app/ /app/
COPY --from=build /go/bin/goreman /usr/bin/goreman
CMD ["/app/main.sh"]

View File

@@ -0,0 +1,8 @@
FROM debian:latest
RUN apt-get update \
&& apt-get -y install ca-certificates
COPY palemoon.list /etc/apt/sources.list.d/palemoon.list
COPY veit@kannegieser.net.gpg /usr/share/keyrings/veit@kannegieser.net.gpg
RUN apt-get update \
&& apt-get install -y palemoon veit-kannegieser-archive-keyring

5
test/palemoon/README.md Normal file
View File

@@ -0,0 +1,5 @@
# Pale Moon CI tests
Pale Moon has exposed [some pretty bad bugs](https://anubis.techaro.lol/blog/release/v1.21.1#fix-event-loop-thrashing-when-solving-a-proof-of-work-challenge) in Anubis. As such, we're running Pale Moon against Anubis in CI to ensure that it keeps working.
This test is a fork of [dtinth/xtigervnc-docker](https://github.com/dtinth/xtigervnc-docker) but focused on Pale Moon.

View File

@@ -0,0 +1,12 @@
bots:
- name: palemoon
user_agent_regex: PaleMoon
action: CHALLENGE
challenge:
difficulty: 4
report_as: 4
algorithm: fast
status_codes:
CHALLENGE: 401
DENY: 403

View File

@@ -0,0 +1,2 @@
xtigervnc: ./xtigervnc.sh
dwm: ./dwm.sh

6
test/palemoon/app/dwm.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
export DISPLAY=:0
while true; do
dwm
sleep 1
done

3
test/palemoon/app/main.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash -e
cd /app
goreman start

2
test/palemoon/app/xtigervnc.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash -e
exec Xtigervnc -desktop "$VNC_DESKTOP_NAME" -geometry "$VNC_GEOMETRY" -listen tcp -ac -SecurityTypes None -AlwaysShared -AcceptKeyEvents -AcceptPointerEvents -SendCutText -AcceptCutText :0

View File

@@ -0,0 +1,26 @@
services:
display:
build: .
volumes:
- ./app:/app:ro
novnc:
image: geek1011/easy-novnc
command: -a :5800 -h display --no-url-password
ports:
- 5800:5800
palemoon-386:
hostname: i386
platform: linux/386
build:
dockerfile: Dockerfile.palemoon
command: sleep inf
environment:
DISPLAY: display:0
palemoon-amd64:
hostname: amd64
platform: linux/amd64
build:
dockerfile: Dockerfile.palemoon
command: sleep inf
environment:
DISPLAY: display:0

View File

@@ -0,0 +1 @@
deb [ signed-by=/usr/share/keyrings/veit@kannegieser.net.gpg] https://kannegieser.net/palemoon mx23_gtk3 main

9
test/palemoon/test.sh Normal file
View File

@@ -0,0 +1,9 @@
export VERSION=$GITHUB_COMMIT-test
export KO_DOCKER_REPO=ko.local
set -u
(
cd ../.. &&
ko build --platform=all --base-import-paths --tags="latest" --image-user=1000 --image-annotation="" --image-label="" ./cmd/anubis -L
)

Binary file not shown.