This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
name: Build AppImage
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-appimage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: node:24-trixie
|
||||||
|
steps:
|
||||||
|
- name: Check out source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gobject-introspection \
|
||||||
|
gir1.2-gtk-4.0 \
|
||||||
|
gir1.2-gtk4layershell-1.0 \
|
||||||
|
python3 \
|
||||||
|
python3-cairo \
|
||||||
|
python3-evdev \
|
||||||
|
python3-gi \
|
||||||
|
python3-xlib \
|
||||||
|
squashfs-tools
|
||||||
|
|
||||||
|
- name: Build AppImage
|
||||||
|
run: ./packaging/build-appimage.sh
|
||||||
|
|
||||||
|
- name: Upload AppImage
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Korin-Timer.AppImage
|
||||||
|
path: build/Korin-Timer.AppImage
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 30
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
"""Regression checks for the AppImage Gitea Actions workflow."""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
WORKFLOW = ROOT / ".gitea" / "workflows" / "build-appimage.yaml"
|
||||||
|
|
||||||
|
|
||||||
|
class GiteaActionsWorkflowTests(unittest.TestCase):
|
||||||
|
def test_build_workflow_creates_and_uploads_the_appimage(self) -> None:
|
||||||
|
workflow = WORKFLOW.read_text()
|
||||||
|
|
||||||
|
self.assertIn("on:", workflow)
|
||||||
|
self.assertIn("workflow_dispatch:", workflow)
|
||||||
|
self.assertIn("runs-on: ubuntu-latest", workflow)
|
||||||
|
self.assertIn("container: node:24-trixie", workflow)
|
||||||
|
self.assertIn("./packaging/build-appimage.sh", workflow)
|
||||||
|
self.assertIn("actions/upload-artifact@v4", workflow)
|
||||||
|
self.assertIn("path: build/Korin-Timer.AppImage", workflow)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
Reference in New Issue
Block a user