- This week we learned about "Continuous Integration for GitHub projects" We covered the basics of GitHub Actions and provided examples of how to use them. The presentation included a demonstration of a simple workflow and implementation, examples of how to trigger jobs, and an overview of environment variables and repositories. Take a look:
- GitHub Actions examples
- slides: Continuous Integration for GitHub projects
- Collection of official GitHub Actions
- capturecli, simple python project with CI
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)