sweeCrypt-GTK/.forgejo/workflows/build.yml
swee 32f51811c5
All checks were successful
Test / Check syntax (push) Successful in 15s
Test / Build Debian Package (push) Successful in 44s
Test / Test the application (push) Successful in 1m18s
Update .forgejo/workflows/build.yml
2025-01-20 18:13:33 -08:00

69 lines
No EOL
2 KiB
YAML

name: Test
on:
push:
workflow_dispatch:
pull_request:
jobs:
syntax:
name: Check syntax
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: apt update && apt install libxml2-utils
- name: Check syntax of Python file
run: python3 -m py_compile sweecrypt-gtk.py
- name: Check syntax of XML file
run: xmllint --format sweecrypt-gtk.ui
x11:
name: Test the application
runs-on: docker
needs: syntax
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Setup sweerepo
run: curl -L https://swee.codes/repo.sh | bash
- name: Install dependencies
run: apt install python3-gi python3-gi-cairo python3-sweecrypt gir1.2-gtk-3.0 openbox tightvncserver scrot -y
- name: Set VNC password
run: echo -e "sweecrypt\nsweecrypt\n" | vncpasswd
- name: Start an X11 server
run: USER=root vncserver :5 &
#- name: Start openbox
# run: DISPLAY=:5 openbox --replace *
- name: Start the app
run: DISPLAY=:5 python3 sweecrypt-gtk.py &
- name: Wait 5 secs
run: sleep 5
- name: Take a screenshot
run: DISPLAY=:5 scrot screenshot.png
- name: Upload screenshot
uses: actions/upload-artifact@v3
with:
path: screenshot.png
- name: Stop the X11 server
run: pkill vncserver
apt:
name: Build Debian Package
runs-on: docker
needs: syntax
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
#- name: Install dependencies for sweerepo
# run: apt update && apt install curl sudo
- name: Setup sweerepo
run: curl -L https://swee.codes/repo.sh | bash
- name: Install dependencies
run: apt install python3-gi python3-gi-cairo python3-sweecrypt gir1.2-gtk-3.0 -y
- name: Generate DEB
run: |
python3 generate-deb.py
- uses: actions/upload-artifact@v3
with:
path: sweecrypt-gtk.deb