DEV Community

ranms25
ranms25

Posted on

OSDC-Github actions

We also discussed the use of a matrix strategy and presented examples of Linux commands with GitHub Actions.

The assignment for the session was to find a project with tests but without continuous integration and set up a GitHub Action to run the tests, then show the results to before sending the pull request to the project owner.

Contribution to Automated Testing: Adding GitHub Actions Workflow to cybrid-api-organization-python

I hope to contribute to this project. I created a GitHub Actions workflow file named "CI" that runs automated tests on multiple operating systems and Python versions to ensure code quality and consistency. The workflow is triggered by push and pull request events as well as manually through the GitHub web interface.

The matrix strategy allows the workflow to test the code on Ubuntu, macOS, and Windows using Python 3.9, 3.10, and 3.11. The setup-python action installs the necessary version of Python, while the install dependencies step installs the required dependencies from the requirements.txt and test-requirements.txt files.

The final step runs the pytest command to execute the test cases. The workflow provides developers with feedback on the quality of their code and alerts them to any issues or errors that need attention.

This automated testing process helps maintain a high level of code quality and ensures that the code is consistent across different operating systems and Python versions. It saves developers time and effort by catching issues early in the development process, allowing them to focus on developing new features and improving existing ones.

Learning and progressing from week to week, keep following :)

Top comments (0)