Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/actions/setup-podman/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ runs:
systemctl --user enable --now podman.socket
echo "DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock" >> $GITHUB_ENV

- name: Expose Podman socket as /var/run/docker.sock
shell: bash
run: |
# GitHub Actions container-based actions mount /var/run/docker.sock
# hardcoded. Symlink it to the Podman socket so those actions work.
sudo ln -sf "$XDG_RUNTIME_DIR/podman/podman.sock" /var/run/docker.sock
sudo chmod 666 "$XDG_RUNTIME_DIR/podman/podman.sock"

- name: Verify Podman and podman-compose
shell: bash
run: |
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/_robot-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Robot Tests

on:
workflow_call:
inputs:
release_version:
required: true
type: string

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
robot-tests:
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Set up Podman
uses: ./.github/actions/setup-podman

- name: Login to ghcr.io
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | \
podman login ghcr.io \
-u "${{ github.actor }}" \
--password-stdin

- name: Run Robot Framework tests
run: ./test/robot/run.sh

- name: Robot Reporter
if: always()
uses: joonvena/robotframework-reporter-action@v2.5
with:
gh_access_token: ${{ secrets.GITHUB_TOKEN }}
report_path: test/robot/results

- name: Upload Robot results
if: always()
uses: actions/upload-artifact@v7
with:
name: robot-results
path: test/robot/results
if-no-files-found: warn
retention-days: 7
17 changes: 12 additions & 5 deletions .github/workflows/_tooling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,20 @@ jobs:
command: just build
release-version: ${{ inputs.release_version }}

- name: Publish test results
uses: dorny/test-reporter@v3
- name: Publish Unit Test Results
uses: mikepenz/action-junit-report@v6
if: always()
with:
name: Pytest Results
path: packtly-builder/tooling/python-test-results.xml
reporter: python-xunit
comment: true
detailed_summary: true
group_suite: true
include_passed: true
include_time_in_summary: true
job_summary: true
report_paths: packtly-builder/tooling/python-test-results.xml
simplified_summary: false
skip_success_summary: false
updateComment: true

- name: Coverage summary
uses: orgoro/coverage@ca0c362dc1a4f100447309405e6dfea47e251495
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,13 @@ jobs:
permissions:
packages: write

robot-tests:
needs:
- runtime-manifest
uses: ./.github/workflows/_robot-tests.yml
with:
release_version: ${{ needs.version.outputs.release_version }}
secrets: inherit
permissions:
checks: write
pull-requests: write
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@ cover/
python-test-results.xml
test-output.xml
*.log

# Robot Framework artifacts
output.xml
report.html
log.html
xunit.xml
debugfile.txt
test/robot/results/
18 changes: 18 additions & 0 deletions test/robot/keywords/git.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*** Settings ***
Library Process

*** Keywords ***
Checkout Repository
[Arguments] ${url} ${path} ${branch}=main

${result}= Run Process
... git
... clone
... --depth
... 1
... --branch
... ${branch}
... ${url}
... ${path}

Should Be Equal As Integers ${result.rc} 0 ${result.stderr}
4 changes: 4 additions & 0 deletions test/robot/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
robotframework
robotframework-requests
robotframework-jsonlibrary
robotframework-pythonlibcore
17 changes: 17 additions & 0 deletions test/robot/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Install robotframework if not already installed
if ! pipx list --short | grep -q '^robotframework '; then
pipx install \
--pip-args="-r ${ROOT}/requirements.txt" \
robotframework
fi

# Tests ausführen
robot \
--outputdir "${ROOT}/results" \
"${ROOT}/suites"

39 changes: 39 additions & 0 deletions test/robot/suites/hello_world.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
*** Settings ***
Documentation Hello World – Robot Framework Einstiegsbeispiel
... Zeigt grundlegende Keywords, Variablen und Log-Ausgaben.

*** Variables ***
${GREETING} Hello, Robot World!
${NAME} Packtly Builder

*** Test Cases ***

Hello World Ausgabe
[Documentation] Gibt eine einfache Begrüßung aus.
Log ${GREETING}
Log To Console ${GREETING}

Variablen verwenden
[Documentation] Demonstriert die Nutzung von Robot-Variablen.
${message}= Set Variable Hello from ${NAME}!
Should Be Equal ${message} Hello from ${NAME}!
Log ${message}

Einfache Assertion
[Documentation] Prüft arithmetische Gleichheit via BuiltIn.
${result}= Evaluate 2 + 2
Should Be Equal As Integers ${result} 4

Schleifen Demo
[Documentation] Iteriert über eine Liste und loggt jeden Eintrag.
@{items}= Create List alpha beta gamma
FOR ${item} IN @{items}
Log Item: ${item}
END

*** Keywords ***

Benutze Gruss
[Arguments] ${name}
[Documentation] Gibt einen personalisierten Gruß zurück.
RETURN Hello, ${name}!
14 changes: 14 additions & 0 deletions test/robot/suites/test_build_systemd.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*** Settings ***
Library OperatingSystem
Resource ../keywords/git.robot

Suite Teardown Remove Directory ${SYSTEMD_PATH} recursive=True

*** Variables ***
${SYSTEMD_URL} https://salsa.debian.org/systemd-team/systemd.git
${SYSTEMD_PATH} ${TEMPDIR}/systemd
${SYSTEMD_BRANCH} debian/master

*** Test Cases ***
Test
Checkout Repository ${SYSTEMD_URL} ${SYSTEMD_PATH} ${SYSTEMD_BRANCH}