The goal of this assignment is to master the core of continuous integration. To achieve this goal, the students (us) are asked to implement a small continuous integration CI server. This CI server will only contain the core features of continuous integration. The features are all specified below.
- Run static analysis on a well-formed python project
- Run test on a well-formed python project
- E-Mail the result of the testing on a well-formed python project
We first checkout this repository:
https://github.com/FrancoisChastel/DD2480_Software-Engineering_CI.git
cd DD2480_Software-Engineering_CI
We then install the required dependencies:
brew install python
For linux user :
curl -LO --tlsv1 https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
For Mac user:
curl -LO --tlsv1 https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip
unzip ngrok-stable-darwin-386.zip
We then execute installing python and pip you can type in your terminal :
make all
make run
It will start a web server on localhost:5000.
We configure our Github repository:
- go to
Settings >> Webhooks
, click onAdd webhook
. - paste the forwarding URL (eg
http://8929b010.ngrok.io
) in fieldPayload URL
) and send click onAdd webhook
. In the simplest setting, nothing more is required.
You can now try to push on this repository :)
Type into terminal
make all
make test
We shutdown everything:
Ctrl-C
in the ngrok terminal windowCtrl-C
in the ngrok python window- delete the webhook in the webhook configuration page.
make clean
in the directoryDD2480_Software-Engineering_CI
Python
This project was developed by :
- François Chastel : [email protected]
- Anu Devarmanai : [email protected]
- Brian Ritter : [email protected]
- Jiayu Sun : [email protected]
- Feature #1 (Compilation) was done by François Chastel.
- Feature #2 (Testing) was done by Jiayu Sun and Anu Devarmanai.
- Feature #3 (Notification) was done by Brian Ritter.
The complication feature was implemented using pylint in compilation.py. The compilation process is then tested in test_ci.py in the corresponding compilation unit tests.
The testing feature was implemented and tested using pytest in test_ci.py.
The notification feature has been implemented by sending an email to the email address [email protected] with the message body containing information about the compilation and testing results (specifically state of compilation/tests, Author of the commit, commit number, repo URL, and compiling messages). This feature was tested in test_ci.py in the corresponding unit test by checking if the email is sent correctly and contains the correct information.