test(palemoon): add some variables

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-07-24 15:55:50 -04:00
parent b2f3f99b52
commit 89230f7678
10 changed files with 59 additions and 15 deletions

View File

@@ -20,13 +20,18 @@ jobs:
- i18n
- palemoon/amd64
- palemoon/i386
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup tmate session
uses: mxschmitt/action-tmate@7b6a61a73bbb9793cb80ad69b8dd8ac19261834c # v3.22
with:
detached: true
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: latest
@@ -45,3 +50,14 @@ jobs:
run: |
cd test/${{ matrix.test }}
backoff-retry --try-count 10 ./test.sh
- name: Sanitize artifact name
if: always()
run: echo "ARTIFACT_NAME=${{ matrix.test }}" | sed 's|/|-|g' >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
with:
name: ${{ env.ARTIFACT_NAME }}
path: test/${{ matrix.test }}/var

View File

@@ -28,7 +28,7 @@ func main() {
flagenv.Parse()
flag.Parse()
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
lanip, err := internal.GetLANIP()

2
test/i18n/var/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -13,6 +13,9 @@ function cleanup() {
trap cleanup EXIT SIGINT
function build_anubis_ko() {
(
cd $REPO_ROOT && npm ci && npm run assets
)
(
cd $REPO_ROOT &&
VERSION=devel ko build \
@@ -40,7 +43,9 @@ function mint_cert() {
(
cd ${REPO_ROOT}/test/pki &&
mkdir -p "${domainName}" &&
go tool minica -domains "${domainName}"
go tool minica -domains "${domainName}" &&
cd "${domainName}" &&
chmod 666 *
)
fi
}

View File

@@ -2,8 +2,8 @@ services:
display:
image: ghcr.io/techarohq/ci-images/xserver:latest
pull_policy: always
# ports:
# - 5900:5900
ports:
- 5900:5900
anubis:
image: ko.local/anubis
@@ -14,6 +14,8 @@ services:
SLOG_LEVEL: DEBUG
volumes:
- ../anubis:/cfg
depends_on:
- relayd
relayd:
image: ghcr.io/xe/x/relayd
@@ -42,3 +44,7 @@ services:
volumes:
- ../../pki:/usr/local/share/ca-certificates/minica:ro
- ../scripts:/hack/scripts:ro
depends_on:
- anubis
- relayd
- display

View File

@@ -1,9 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
export VERSION=$GITHUB_COMMIT-test
export KO_DOCKER_REPO=ko.local
function capture_vnc_snapshots() {
sudo apt-get update && sudo apt-get install -y gvncviewer
mkdir -p ./var
while true; do
timestamp=$(date +"%Y%m%d%H%M%S")
gvnccapture localhost:0 ./var/snapshot_$timestamp.png 2>/dev/null
sleep 1
done
}
source ../../lib/lib.sh
if [ "$GITHUB_ACTIONS" = "true" ]; then
capture_vnc_snapshots &
fi
set -euo pipefail
build_anubis_ko
mint_cert relayd

View File

@@ -2,8 +2,8 @@ services:
display:
image: ghcr.io/techarohq/ci-images/xserver:latest
pull_policy: always
# ports:
# - 5900:5900
ports:
- 5900:5900
anubis:
image: ko.local/anubis

View File

@@ -1,5 +1,8 @@
#!/usr/bin/env bash
export VERSION=$GITHUB_COMMIT-test
export KO_DOCKER_REPO=ko.local
set -euo pipefail
source ../../lib/lib.sh

2
test/palemoon/i386/var/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -1,7 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
set -x
(cd amd64 && ./test.sh && docker compose down -t0 && docker compose rm)
(cd i386 && ./test.sh && docker compose down -t0 && docker compose rm)