summaryrefslogtreecommitdiff
path: root/docs/guide/testing.rst
blob: cae4fc7f3b4554314898851021db00bf19c256a0 (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
.. include:: ../icons.rst

==================================
Testing and Continuous Integration
==================================

To get automated tests of GTK code running on a headless server use Xvfb
(virtual framebuffer X server). It provides the ``xvfb-run -a`` command which
creates a temporary X server without the need for any real display hardware.

::

    xvfb-run -a python my_script.py


Continuous Integration using Travis CI / CircleCI
-------------------------------------------------

Travis CI uses a rather old Ubuntu and thus the supported GTK is at 3.18 and
PyGObject is at 3.20. If that's enough for you then have a look at our Travis
CI example project:

    |github-logo| https://github.com/pygobject/pygobject-travis-ci-examples

    .. image:: https://travis-ci.org/pygobject/pygobject-travis-ci-examples.svg?branch=master
        :target: https://travis-ci.org/pygobject/pygobject-travis-ci-examples

To get newer PyGObject, GTK, etc. working on `Travis CI
<https://travis-ci.org>`__ or `CircleCI <https://circleci.com>`__ you can use
Docker with an image of your choosing. Have a look at our Docker example
project which runs tests on various Debian, Ubuntu and Fedora versions:

    |github-logo| https://github.com/pygobject/pygobject-travis-ci-docker-examples

    .. image:: https://travis-ci.org/pygobject/pygobject-travis-ci-docker-examples.svg?branch=master
        :target: https://travis-ci.org/pygobject/pygobject-travis-ci-docker-examples

    .. image:: https://circleci.com/gh/pygobject/pygobject-travis-ci-docker-examples.svg?style=shield
        :target: https://circleci.com/gh/pygobject/pygobject-travis-ci-docker-examples