Closed vherus closed 1 year ago
More info here: https://github.com/boolean-uk/software-developer/issues/115
Exercises this CI needs to be added to:
Current work in progress: https://github.com/boolean-uk/api-express-modular-routing/pull/3
This exercise has now been updated: https://github.com/boolean-uk/api-express-modular-routing
This exercise has now been updated: https://github.com/boolean-uk/api-express-counter
https://github.com/boolean-uk/api-express-address-book
Update README instructions to follow a specific set up
This repo has a complete CI workflow: https://github.com/boolean-uk/database-cinema-booking-api/
Each API exercise from Address Book onwards needs a similar setup. This includes:
main
branch CI with tests for any starter code the students are given as part of the exercisemain
main
The repos should contain a complete suite of core criteria tests. Any starter code tests should be separated into their own test directory so the
main
branch CI can run only those, which should pass.Core criteria CI should run all of the core criteria tests.
Extension CI should run all of the extension tests - one extension test should be provided in the repo as a guide for students, but they need to write the rest of them.
The exercise requirements should be put into API specs instead of listed in the README, a separate one for core criteria and extension criteria. These can be served from the repo
docs/
folder on GitHub Pages with links to the deployed pages in the README of the exercise, see the cinema API exercise for an example.To generate the docs, we need to create some Open API
.yml
files - these can also be seen in the root directory of the cinema API exercise. Once the yml files have been created, a separate one for core & extensions, run the below command to generate the appropriate documentation:npx redoc-cli build name-of-core-criteria-yml-file.yml -o docs/index.html
for the core criteria specnpx redoc-cli build name-of-ext-criteria-yml-file.yml -o docs/extensions.html
for the extension criteria specThe tests themselves rely on
jest
andsupertest
, with some helper functions to wipe databases between test runs. Examine the cinema API exercise test suite to see how this is configured.When everything is setup in a repo, it must be tested completely from a students point of view to verify before rolling it out. This means completing the exercise as a student would and keeping an eye out for flaws / improvements.