Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Qiwen Yu
Qiwen Yu

Posted on

     

Add Continuous Integration to GitHub Repo

For this part of the work, CI (Continuous Integration) pipeline was applied in my GitHub opensource project,TextHTMLPress.

In general, CI is a method whereby we build and run our tests (i.e., integrate everything in our project) automatically whenever anything is pushed to the repo, or a new pull request is made. In this way, we can implement the idea that no developer is ever allowed to break the main branch.

For GitHub projects, GitHub provides its own CI service calledGitHub Actions. Actions allow us to automate workflows in response to events in a GitHub repo (e.g., merging to main, creating a pull request, etc). In this repo, I created a GitHub Actions Workflow that runs my tests and can be triggered on any push to the default branch (e.g., main), and for any pull request to the default branch. To add an GitHub Actions for python project, themanual is here, which is to add a.yml workflow file to the.github/workflows directory of your repository. Myworkflow file can be found here.

The CI process integrated to my project, It will test code inubuntu system with Python version 3.6, 3.7, 3.8 and 3.9. It can install dependencies, lint with Flake8, and run tests with pytest.

After I set up my CI, I submitted a PR to test my CI andit passed all tests automatically. Similarly, I submitted anotherPR to test the CI of another opensource.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

A raw watermelon.
  • Joined

More fromQiwen Yu

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp