Skip to content

A demo for using travis-ci and codecov to test, build, and release a PyQt application.

Notifications You must be signed in to change notification settings

mickey9910326/pyqt-cicd-demo

Repository files navigation

pyqt-cicd-demo

Build Status codecov

About

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.

reference

Steps to build your own pipline

  1. Copy .travis.yml, requirements-test.txt in this repo to your own repo. And enable your repo in travis-ci

  2. Go to travis-ci setting page.

  3. 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.

  4. 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

  5. Push a new commit to test it.

  6. Create a new tag to test deploy jobs.

  7. Add the badge to your project page, and open your favorite game!

About

A demo for using travis-ci and codecov to test, build, and release a PyQt application.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published