Publish both TigerVNC and TurboVNC image to quay.io #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a GitHub workflow defining a set of jobs with a set of steps. | |
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
# | |
name: Test | |
on: | |
pull_request: | |
push: | |
branches-ignore: | |
- "dependabot/**" | |
- "pre-commit-ci-update-config" | |
tags: ["**"] | |
workflow_dispatch: | |
jobs: | |
container: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- vncserver: tigervnc | |
- vncserver: turbovnc | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build image | |
run: | | |
docker build --build-arg vncserver=${{ matrix.vncserver }} -t jupyter-remote-desktop-proxy . | |
- name: Smoke test image | |
run: | | |
container_id=$(docker run -d -p 8888:8888 -e JUPYTER_TOKEN=secret jupyter-remote-desktop-proxy) | |
# -help flag is only available for TigerVNC, where TurboVNC can't | |
# print info without returning an error code. | |
docker exec $container_id vncserver -help || true | |
docker exec $container_id vncserver -list | |
sleep 10 | |
curl 'http://localhost:8888/desktop/?token=secret' | grep 'Jupyter Remote Desktop Proxy' | |
# Test if the built JS file is present in the image | |
curl 'http://localhost:8888/desktop/dist/viewer.js?token=secret' > /dev/null | |
# TODO: Check VNC desktop works, e.g. by comparing Playwright screenshots | |
# https://playwright.dev/docs/test-snapshots |