This project helps people set up their own a CI/CD pipline for your pyqt application.
This repo is a demo or example to develop a pyqt5 application with CI/CD. It use travis-ci as a CI/CD service to test, build, and release pyqt application.
If you are lazy as me, just copy the .travis.yml
to your project, and follow the steps below to build a CI/CD pipline for your pyqt application.
This repo use pytest and qtest to test a pyqt application on windows os, linux, and MacOS. After test, a test report will be send to codecov, and codecov will show the code coverage for pyqt application. NOTE: The tests done in this repo is quite simple, it will be more complicated in a real pyqt application.
A tag created will trigger deploy jobs. In deploy stage, travis-ci job will use pyinstaller to build an executable binary file on windows, linux, and MacOS. Then tar executable binary and library files together. At last, release the tar file to github.
-
QApplication instance/qtbot fixture causes travis-ci to abort and core dump
-
stackoverflow - How to deploy to github releases from travis
-
Copy
.travis.yml
,requirements-test.txt
in this repo to your own repo. And enable your repo in travis-ci -
Go to travis-ci setting page.
-
Set the
GITHUB_TOCKEN
environment variable in travis-ci setting page.Travis-ci use this tocken to get access for your github repo in deploy job.
You can generate your key at github.com/settings/tokens/new.
NOTE: This setting is for public repo. If you use pravite repo, just check the repo option for pravite repo access.
-
Set the
CODECOV_TOKEN
environment variable in travis-ci setting page.In the last of test job, command
codecov
will use this tocken to get access your project on codecov.io and upload test report.You can get the key of your project at the projecting setting page in codecov.io.
app.codecov.io/gh/username/project-name/settings
-
Push a new commit to test it.
-
Create a new tag to test deploy jobs.
-
Add the badge to your project page, and open your favorite game!