Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow for testing and buidling #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
68 changes: 68 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Setup TLPUI

on:
push:
branches: [ master ]
tags:
- '*'
pull_request:
branches: [ master ]


permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt install python3-gi git python3-setuptools python3-stdeb python-all dh-python
- name: Setup
run: |
python ./setup.py build
- name: Test
run: |
python -m unittest test/test_tlp_configs.py
python -m unittest test/test_tlp_settings.py

flatpak:
name: "Flatpak"
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-40
options: --privileged
steps:
- uses: actions/checkout@v3
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
with:
bundle: com.github.d4nj1.tlpui
manifest-path: flatpak/com.github.d4nj1.tlpui.json
cache-key: flatpak-builder-${{ github.sha }}

deb:
permissions:
contents: write
name: "deb package"
runs-on: ubuntu-latest
container: ubuntu
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
apt-get -y update
apt-get -y install python3-gi git python3-setuptools python3-stdeb dh-python debhelper
- name: Setup
run: |
python3 setup.py --command-packages=stdeb.command bdist_deb
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: deb_dist/python3-tlpui_*all.deb