aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/python-app.yml
blob: fefb727f4f629c51a5b871df8a585f80616da992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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