Resolve "Continuous integration setup"
name: Feature
about: New features or wider changes,
Closes #9
Description
Adds a very preliminary CI workflow to launch unit and end2end testing of the Web app, as well a a python unittest job
-
wrt e2e testing, there is juste one test to make sure the server starts and display the first page (check on title item)
-
wrt unit testing, the automatic skeletons for each component/service generated by the Angular CLI have been fixed (dependency ingection). This is however not really testing anything yet. Additional issues are required for refactoring (having a single shared rest service for all http calls to support mock)
-
wrt python test, it follows the architecture described in : https://realpython.com/python-testing/ https://realpython.com/token-based-authentication-with-flask/ and https://github.com/realpython/flask-jwt-auth
Both CI workflows (backend and frontend) are just composed of one single task/job, with all the instructions. It should be split in install/build/test at some point.
Additionaly, two slaves have been created on the CI portal, one using the shell executor and another one using the docker executor. The testing job just runs on the shell executor for now as some issues with dependencies/ci need to be cleared first.
Changelog
- Added unit and e2e setup for Angular
- Added initial CI job
How to test
- restart the successfull job on this branch in the pipeliens
- pull the branch, install Python and npm dependencies
- install chromium/chromium driver and setup the CHROME_BIN env var
- in the frontend folder,
ng test
launches the unit tests locally (browser will appear) - in the frontend folder,
ng e2e
launches the e2e tests locally (browser will not appear unless changing the config in protractor.cfg) - In the backend folder, launch the unittests with
python3 -m unittest