aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/python-app.yml
diff options
context:
space:
mode:
authorBrianna Rainey2026-01-22 21:53:26 -0500
committerBrianna Rainey2026-01-22 21:53:26 -0500
commit864898419e810055b51e3a32fccb00a62aab9a6b (patch)
tree1eb6d03e3ef429e9d318bf0dff15c92c179421d0 /.github/workflows/python-app.yml
parent0a521106c4f57a7a198e8238ad9bf6772c4e23b5 (diff)
add GitHub Action to run tests
Diffstat (limited to '.github/workflows/python-app.yml')
-rw-r--r--.github/workflows/python-app.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml
new file mode 100644
index 0000000..fefb727
--- /dev/null
+++ b/.github/workflows/python-app.yml
@@ -0,0 +1,40 @@
+# This workflow will install Python dependencies and run tests with a single version of Python
+#
+# For more information see:
+# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
+#
+# For information on using pytest-qt in GitHub Actions see:
+# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
+
+name: Python application
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ env:
+ DISPLAY: ':99.0'
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v3
+ with:
+ python-version: "3.12"
+ - name: Install system dependencies
+ run: |
+ sudo apt install -y ffmpeg libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils libgl1 libegl1 libdbus-1-3 libxcb-cursor0 fonts-noto-core
+ - name: Install Python dependencies
+ run: |
+ pip install . pytest pytest-qt pytest-xvfb
+ - name: Test with pytest
+ run: |
+ python3 -m pytest -v \ No newline at end of file