Skip to content

Feat: Base for Testable codebase #8

Feat: Base for Testable codebase

Feat: Base for Testable codebase #8

Workflow file for this run

name: DotNET Testing (Photino)
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: [ master ]
jobs:
test:
name: Build & Test (Photino Headless)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup .NET 9 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'
# Install GTK, WebKitGTK, Xvfb, and Openbox dependencies
- name: Install WebKitGTK and dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
xvfb \
openbox \
libnotify4 \
libnotify-dev \
libwebkit2gtk-4.1-dev \
libgtk-3-dev \
libglib2.0-dev \
libgdk-pixbuf2.0-dev \
libpango1.0-dev \
libatk1.0-dev \
libharfbuzz-dev \
libepoxy-dev \
libx11-dev
- name: Restore dependencies
run: dotnet restore InfiniLore.Photino.GitHubActions.slnf
- name: Build (Release)
run: |
dotnet build InfiniLore.Photino.GitHubActions.slnf \
--configuration Release \
--no-restore \
-p:GeneratePackageOnBuild=false \
-p:IsPackable=false
- name: Run tests (headless with Openbox)
env:
CI: true
DISPLAY: ":99"
run: |
echo "Starting virtual framebuffer..."
Xvfb :99 -screen 0 1920x1080x24 &
sleep 3
echo "Starting Openbox window manager..."
openbox >/dev/null 2>&1 &
sleep 5
echo "Running tests..."
dotnet test InfiniLore.Photino.GitHubActions.slnf \
--configuration Release \
--no-restore \
--no-build