Skip to content

Commit c0c9c39

Browse files
committed
Add backend & frontend tests
1 parent aa7eaaf commit c0c9c39

221 files changed

Lines changed: 20333 additions & 1931 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ddev/addon-metadata/ddev-playwright/manifest.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.ddev/commands/web/playwright

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/bin/sh
2-
#ddev-generated
32

4-
cd test/playwright || exit 1
3+
set -eu
54

6-
if [ -f bun.lock ]; then
7-
bun && bun playwright "$@"
8-
elif [ -f yarn.lock ]; then
9-
yarn && yarn playwright "$@"
10-
else
11-
npx playwright "$@"
12-
fi
5+
export PW_TEST_CONNECT_WS_ENDPOINT="${PW_TEST_CONNECT_WS_ENDPOINT:-ws://playwright:3000/}"
6+
7+
exec bunx playwright "$@"

.ddev/config.playwright.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.ddev/config.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ database:
1313
webimage_extra_packages: [ffmpeg, libgl1]
1414
use_dns_when_possible: true
1515
composer_version: '2'
16-
web_environment: []
16+
web_environment:
17+
- PW_TEST_CONNECT_WS_ENDPOINT=ws://playwright:3000/
18+
- PEST_BROWSER_PLAYWRIGHT_HOST=playwright
19+
- PEST_BROWSER_PLAYWRIGHT_PORT=3000
20+
- RENPY_ANALYSIS_MODE=sandbox
21+
- RENPY_ANALYZER_URL=http://stats-runner:8080/api/renpy-analyzer/analyze
22+
- RENPY_ANALYZER_TOKEN=ddev-renpy-analyzer
23+
- RENPY_ANALYZER_TIMEOUT=300
24+
- RENPY_ANALYZER_HOST_WORK_DIR=${DDEV_APPROOT}/.ddev/.renpy-analyzer
25+
- RENPY_ANALYZER_CONTAINER_WORK_DIR=/runner-work
26+
- RENPY_SDK_DOCKER_HOST_PATH=${RENPY_SDK_HOST_PATH:-/tmp/fvn-empty-renpy-sdk}
1727
corepack_enable: false
1828
web_extra_exposed_ports:
1929
- name: vite
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
services:
2+
playwright:
3+
container_name: ddev-${DDEV_SITENAME}-playwright
4+
image: mcr.microsoft.com/playwright:v1.59.1-noble
5+
init: true
6+
ipc: host
7+
working_dir: /home/pwuser
8+
user: pwuser
9+
command:
10+
- /bin/sh
11+
- -c
12+
- npx -y playwright@1.59.1 run-server --port 3000 --host 0.0.0.0
13+
expose:
14+
- "3000"
15+
external_links:
16+
- ddev-router:${DDEV_HOSTNAME}
17+
labels:
18+
com.ddev.site-name: ${DDEV_SITENAME}
19+
com.ddev.approot: ${DDEV_APPROOT}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
services:
22
web:
33
volumes:
4-
- ${RENPY_SDK_HOST_PATH}:/opt/renpy-sdk
4+
- ${RENPY_SDK_HOST_PATH:-/tmp/fvn-empty-renpy-sdk}:/opt/renpy-sdk:ro
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
services:
2+
stats-runner:
3+
container_name: ddev-${DDEV_SITENAME}-stats-runner
4+
image: ddev/ddev-webserver:${DDEV_VERSION}-${DDEV_SITENAME}-built
5+
user: root
6+
working_dir: /var/www/html/public
7+
command:
8+
- php8.5
9+
- -S
10+
- 0.0.0.0:8080
11+
- ../vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
12+
expose:
13+
- "8080"
14+
healthcheck:
15+
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8080/health >/dev/null"]
16+
interval: 1s
17+
timeout: 5s
18+
retries: 120
19+
start_period: 5s
20+
environment:
21+
APP_KEY: ${APP_KEY:-base64:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=}
22+
RENPY_ANALYZER_SERVER: "true"
23+
RENPY_ANALYZER_TOKEN: ddev-renpy-analyzer
24+
RENPY_ANALYZER_IMAGE: ddev/ddev-webserver:${DDEV_VERSION}-${DDEV_SITENAME}-built
25+
RENPY_ANALYZER_PHP_BINARY: php8.5
26+
RENPY_ANALYZER_HOST_WORK_DIR: ${DDEV_APPROOT}/.ddev/.renpy-analyzer
27+
RENPY_ANALYZER_CONTAINER_WORK_DIR: /runner-work
28+
RENPY_SDK_DOCKER_HOST_PATH: ${RENPY_SDK_HOST_PATH:-/tmp/fvn-empty-renpy-sdk}
29+
RENPY_SDK_PATH: /opt/renpy-sdk
30+
APP_ENV: local
31+
volumes:
32+
- ${DDEV_APPROOT}:/var/www/html:cached
33+
- ${DDEV_APPROOT}/.ddev/.renpy-analyzer:/runner-work
34+
- ${RENPY_SDK_HOST_PATH:-/tmp/fvn-empty-renpy-sdk}:/opt/renpy-sdk:ro
35+
- /var/run/docker.sock:/var/run/docker.sock
36+
labels:
37+
com.ddev.site-name: ${DDEV_SITENAME}
38+
com.ddev.approot: ${DDEV_APPROOT}

.ddev/web-build/Dockerfile.archive-tools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
RUN apt-get update \
2-
&& apt-get install -y --no-install-recommends pipx \
2+
&& apt-get install -y --no-install-recommends docker-cli pipx \
33
&& PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install unrpa \
44
&& PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install rpycdec \
55
&& apt-get clean \

.ddev/web-build/Dockerfile.bun

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
11
#ddev-generated
2-
RUN curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash
2+
ARG BUN_VERSION=1.3.13
3+
ARG BUN_LINUX_X64_BASELINE_SHA256=9d8a24292a7068090205daac0a5a223f5f69736f5287e37bf88d3b4031edc750
4+
ARG BUN_LINUX_AARCH64_SHA256=70bae41b3908b0a120e1e58c5c8af30e74afae3b8d11b0d3fdd8e787ddfb4b22
5+
6+
RUN apt-get update \
7+
&& apt-get install -y --no-install-recommends ca-certificates curl unzip \
8+
&& ( \
9+
arch="$(dpkg --print-architecture)" \
10+
&& case "$arch" in \
11+
amd64) bun_target="bun-linux-x64-baseline"; bun_sha256="$BUN_LINUX_X64_BASELINE_SHA256" ;; \
12+
arm64) bun_target="bun-linux-aarch64"; bun_sha256="$BUN_LINUX_AARCH64_SHA256" ;; \
13+
*) echo "Unsupported architecture for Bun: $arch" >&2; exit 1 ;; \
14+
esac \
15+
&& curl -fsSL "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/${bun_target}.zip" -o /tmp/bun.zip \
16+
&& echo "${bun_sha256} /tmp/bun.zip" | sha256sum -c - \
17+
&& unzip -q /tmp/bun.zip -d /tmp/bun \
18+
&& install -m 0755 "/tmp/bun/${bun_target}/bun" /usr/local/bin/bun \
19+
&& rm -rf /tmp/bun /tmp/bun.zip \
20+
&& bun --version \
21+
) \
22+
&& rm -rf /var/lib/apt/lists/*

.env.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ APP_URL=https://${APP_DOMAIN}
1212
LOG_CHANNEL=stack
1313
LOG_DEPRECATIONS_CHANNEL=null
1414
LOG_LEVEL=warning
15+
LOG_STACK=single
1516

1617
DB_CONNECTION=pgsql
1718
DB_HOST=db
@@ -77,6 +78,7 @@ ITCH_USERNAME=
7778
ITCH_PASSWORD=
7879
ITCH_FREE_COLLECTION_ID=
7980
ITCH_PAID_COLLECTION_ID=
81+
IMAGE_DOWNLOAD_ALLOWED_HOSTS=img.itch.zone,img.itch.io,shared.akamai.steamstatic.com,cdn.akamai.steamstatic.com,shared.cloudflare.steamstatic.com,cdn.cloudflare.steamstatic.com,steamcdn-a.akamaihd.net
8082

8183
# FlareSolverr for bypassing Cloudflare protection
8284
FLARESOLVERR_URL=http://flaresolverr:8191
@@ -105,6 +107,15 @@ ITCHIO_CLIENT_ID=
105107
ITCHIO_CLIENT_SECRET=
106108

107109
RENPY_SDK_PATH=/opt/renpy-sdk
110+
RENPY_ANALYSIS_MODE=sandbox
111+
RENPY_ANALYZER_URL=http://stats-runner:8080/api/renpy-analyzer/analyze
112+
RENPY_ANALYZER_TOKEN=
113+
RENPY_ANALYZER_TIMEOUT=300
114+
RENPY_ANALYZER_PHP_BINARY=php
115+
RENPY_ANALYZER_STALE_CLEANUP_SECONDS=7200
116+
RENPY_ANALYZER_HOST_WORK_DIR=/var/lib/fvn-renpy-analyzer
117+
RENPY_ANALYZER_CONTAINER_WORK_DIR=/runner-work
118+
RENPY_SDK_DOCKER_HOST_PATH=/opt/renpy-sdk
108119

109120
NIGHTWATCH_TOKEN=
110121
NIGHTWATCH_REQUEST_SAMPLE_RATE=0.05

0 commit comments

Comments
 (0)