mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-09 10:08:45 +00:00
test: start work on Pale Moon tests
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
14
test/palemoon/Dockerfile
Normal file
14
test/palemoon/Dockerfile
Normal 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"]
|
||||
8
test/palemoon/Dockerfile.palemoon
Normal file
8
test/palemoon/Dockerfile.palemoon
Normal 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
5
test/palemoon/README.md
Normal 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.
|
||||
12
test/palemoon/anubis/anubis.yaml
Normal file
12
test/palemoon/anubis/anubis.yaml
Normal 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
|
||||
2
test/palemoon/app/Procfile
Normal file
2
test/palemoon/app/Procfile
Normal file
@@ -0,0 +1,2 @@
|
||||
xtigervnc: ./xtigervnc.sh
|
||||
dwm: ./dwm.sh
|
||||
6
test/palemoon/app/dwm.sh
Executable file
6
test/palemoon/app/dwm.sh
Executable 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
3
test/palemoon/app/main.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash -e
|
||||
cd /app
|
||||
goreman start
|
||||
2
test/palemoon/app/xtigervnc.sh
Executable file
2
test/palemoon/app/xtigervnc.sh
Executable 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
|
||||
26
test/palemoon/docker-compose.yml
Normal file
26
test/palemoon/docker-compose.yml
Normal 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
|
||||
1
test/palemoon/palemoon.list
Normal file
1
test/palemoon/palemoon.list
Normal 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
9
test/palemoon/test.sh
Normal 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
|
||||
)
|
||||
BIN
test/palemoon/veit@kannegieser.net.gpg
Normal file
BIN
test/palemoon/veit@kannegieser.net.gpg
Normal file
Binary file not shown.
Reference in New Issue
Block a user