mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-27 10:32:42 +00:00
test(palemoon): add some variables
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -20,13 +20,18 @@ jobs:
|
|||||||
- i18n
|
- i18n
|
||||||
- palemoon/amd64
|
- palemoon/amd64
|
||||||
- palemoon/i386
|
- palemoon/i386
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
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
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: latest
|
node-version: latest
|
||||||
@@ -45,3 +50,14 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd test/${{ matrix.test }}
|
cd test/${{ matrix.test }}
|
||||||
backoff-retry --try-count 10 ./test.sh
|
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
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ func main() {
|
|||||||
flagenv.Parse()
|
flagenv.Parse()
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Minute)
|
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
lanip, err := internal.GetLANIP()
|
lanip, err := internal.GetLANIP()
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
+6
-1
@@ -13,6 +13,9 @@ function cleanup() {
|
|||||||
trap cleanup EXIT SIGINT
|
trap cleanup EXIT SIGINT
|
||||||
|
|
||||||
function build_anubis_ko() {
|
function build_anubis_ko() {
|
||||||
|
(
|
||||||
|
cd $REPO_ROOT && npm ci && npm run assets
|
||||||
|
)
|
||||||
(
|
(
|
||||||
cd $REPO_ROOT &&
|
cd $REPO_ROOT &&
|
||||||
VERSION=devel ko build \
|
VERSION=devel ko build \
|
||||||
@@ -40,7 +43,9 @@ function mint_cert() {
|
|||||||
(
|
(
|
||||||
cd ${REPO_ROOT}/test/pki &&
|
cd ${REPO_ROOT}/test/pki &&
|
||||||
mkdir -p "${domainName}" &&
|
mkdir -p "${domainName}" &&
|
||||||
go tool minica -domains "${domainName}"
|
go tool minica -domains "${domainName}" &&
|
||||||
|
cd "${domainName}" &&
|
||||||
|
chmod 666 *
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ services:
|
|||||||
display:
|
display:
|
||||||
image: ghcr.io/techarohq/ci-images/xserver:latest
|
image: ghcr.io/techarohq/ci-images/xserver:latest
|
||||||
pull_policy: always
|
pull_policy: always
|
||||||
# ports:
|
ports:
|
||||||
# - 5900:5900
|
- 5900:5900
|
||||||
|
|
||||||
anubis:
|
anubis:
|
||||||
image: ko.local/anubis
|
image: ko.local/anubis
|
||||||
@@ -14,6 +14,8 @@ services:
|
|||||||
SLOG_LEVEL: DEBUG
|
SLOG_LEVEL: DEBUG
|
||||||
volumes:
|
volumes:
|
||||||
- ../anubis:/cfg
|
- ../anubis:/cfg
|
||||||
|
depends_on:
|
||||||
|
- relayd
|
||||||
|
|
||||||
relayd:
|
relayd:
|
||||||
image: ghcr.io/xe/x/relayd
|
image: ghcr.io/xe/x/relayd
|
||||||
@@ -42,3 +44,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ../../pki:/usr/local/share/ca-certificates/minica:ro
|
- ../../pki:/usr/local/share/ca-certificates/minica:ro
|
||||||
- ../scripts:/hack/scripts:ro
|
- ../scripts:/hack/scripts:ro
|
||||||
|
depends_on:
|
||||||
|
- anubis
|
||||||
|
- relayd
|
||||||
|
- display
|
||||||
|
|||||||
@@ -1,9 +1,26 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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
|
source ../../lib/lib.sh
|
||||||
|
|
||||||
|
if [ "$GITHUB_ACTIONS" = "true" ]; then
|
||||||
|
capture_vnc_snapshots &
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
build_anubis_ko
|
build_anubis_ko
|
||||||
mint_cert relayd
|
mint_cert relayd
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ services:
|
|||||||
display:
|
display:
|
||||||
image: ghcr.io/techarohq/ci-images/xserver:latest
|
image: ghcr.io/techarohq/ci-images/xserver:latest
|
||||||
pull_policy: always
|
pull_policy: always
|
||||||
# ports:
|
ports:
|
||||||
# - 5900:5900
|
- 5900:5900
|
||||||
|
|
||||||
anubis:
|
anubis:
|
||||||
image: ko.local/anubis
|
image: ko.local/anubis
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
export VERSION=$GITHUB_COMMIT-test
|
||||||
|
export KO_DOCKER_REPO=ko.local
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
source ../../lib/lib.sh
|
source ../../lib/lib.sh
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
@@ -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)
|
|
||||||
Reference in New Issue
Block a user