GitHub-Security-Alerts-Workflow
GitHub-Security-Alerts-Workflow copied to clipboard
Implement CI/CD for this codebase
Issue #, if available: This is to address issue #4
The CI Pipeline for the fork that this PR is being generated from can be seen at: https://cd.screwdriver.cd/pipelines/2882/events
Description of changes:
Created a Screwdriver CI/CD configuration
- Added a screwdriver.yaml file to perform various code validations
Get unit tests working
- Moved the code into
src/github_security_alerts
to separate the importable code for packaging. - Added a setup.py and setup.cfg files to create a python package named github-security-alerts.
- Added a tox.ini to allow running the tests locally and against multiple python releases.
- Added a screwdriver.yaml to provide ci/cd configuration to run the tests and other code validations.
Refactored the modules to allow them to run in the package and the tests could be run:
- Changed all intermodule imports into relative imports to prevent loading a module with the same name from a different package/module.l
- Refactored the arguments module:
- Put the argument parsing into a function since the existing code could not be tested easily since the code to parse the arguments was only run once on import, so couldn't be run multiple times with different command line arguments.
- Refactored the parsing to use the argparse library.
- Updated calls to the arguments module to use the parse_arguments function.
Write a test for one module
- Wrote a test for the arguments.py module to check argument parsing if all arguments are passed.
Add an Console Script entrypoint to provide the cli command mentioned in the README.md
Python codestyle fixes to pass Pycodestyle validation in CI Pipeline
Update the install instructions in the README.md
I confirm that this contribution is made under the terms of your choice and that I have the authority necessary to make this contribution on behalf of its copyright owner.