Skip to content

tblanarik-dev/actions-ci-unittest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Unittests with GitHub Actions

This is a simple GitHub repository that shows how you can use GitHub Actions to run unittests on Python code.

The workflow file is found here at .github/workflows/py-unittest.yml, and it simply runs the command:

python -m unittest *.py

Tests Failing

Test My Python

To see the failing test results, visit the results of this job.

You'll notice that the test failed and the reason given is:

AssertionError: 4 != 5

CleanShot 2022-11-02 at 12 09 50

Fix the failing test

Test My Python

You can easily fix the failing test with this Pull Request- "Fix Failing Unittest"

And sure enough, the tests pass and the GitHub Actions workflow shows green 🟢:

CleanShot 2022-11-02 at 12 14 40

As well as when looking at the Pull Request itself:

CleanShot 2022-11-02 at 12 14 52

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%