Closed ppremk closed 5 years ago
Thanks for the detailed write up @ppremk. My opinions may change as I implement the suggestions, but here are my thoughts so far:
1. Enable continuous integration (new template branch)
✨ I noticed that you even completed the stage so we don't get a build error THANK YOU!
- Enable GitHub Pages (pointing to master/docs without theme selection)
I'm not sure this makes sense right off the bat. It introduces a CD concept first in a CI course. I like doing it at the end as the cherry on the cake.
3. Step Create a folder named .circleci and add a file config.yml (so that the file path be in .circleci/config.yml). (this step is executed in GitHub)
Then we don't need to provide the file on a branch, do we?
4. Add Validation Enable/Configure Test Automation (new template branch)
Looks ✨
- Step to add Gemfile with taks to add htmlprrofer and supporting dependencies
- Step to add Rakefile with basic task which runs a shell command to echo out some text
I'm not sure I want to devote so many steps to language specific items (like a Gemfile and Rakefile). But, then again, it's something we can improve upon as we add support for more languages. How awesome would it be if we had a template repo for Ruby projects, and another for Node, and another for Go, and so on.
Note: The Gemfile.lock is a generated file when the project is compiled, I am in two minds about adding this file as part of this step. Will need to test if the test works without the Gemfile.lock
Gemfile.lock
should be committed to the repository, and it should be generated by bundle install
. Without making learners run bundle install
locally, I think the best course of action is to introduce it for them on a branch.
- Step to enable "Require status checks to pass before merging" -->
ci/circleci: build
Thanks for checking on this. I've been trying Circle CI with the Checks API and, in that case, we should check for a ci/circleci: workflow
.
@ppremk I think somewhere along the way we lost a test. I envisioned a link checker to be an initial use of CI, but I also envisioned a second use of CI where we would add a new feature to docsify (for example, adding a cover page) and then a unit test to ensure that feature works (for example, visiting the deployed URL should return the cover page). Does that make sense?
@ppremk for Step 1: Enable continuous integration, it won't work without a Gemfile:
This is the output from Circle:
bundle install --jobs=4 --retry=3 --path vendor/bundle
Could not locate Gemfile
Exited with code 10
I think this is because the Gemfile is used for bundle install
, which you call in the CircleCI config.
@ppremk let's change this as follows:
4. Add Validation Enable/Configure Test Automation (new template branch)
^ let's keep using the branch: configure-test-automation
- Step to add Gemfile with taks to add htmlprrofer and supporting dependencies
- Step to add Rakefile with basic task which runs a shell command to echo out some text
^ let's do this for the learner on the branch automatically
- Step to edit .circleci/config.yml line which replaces the
echo out
command withbundle execute rake test
^ this is the part we'll need the learner to do manually, please remove it from the branch
:wave: @ppremk I’ve spent some time working on this and think I can make the changes I described. However, I’m still spending some time thinking about the unit test.
I'm not sure this makes sense right off the bat. It introduces a CD concept first in a CI course. I like doing it at the end as the cherry on the cake.
💯 agreed
Then we don't need to provide the file on a branch, do we?
We could provide a blank config.yml file and as an activity get the users to fill it out via copy paste?
I'm not sure I want to devote so many steps to language specific items (like a Gemfile and Rakefile). But, then again, it's something we can improve upon as we add support for more languages. How awesome would it be if we had a template repo for Ruby projects, and another for Node, and another for Go, and so on.
These steps are proposals, we can introduce these files and skip manual steps where necessary, so I would go with your thoughts and flow 🙂
Gemfile.lock
should be committed to the repository, and it should be generated bybundle install
. Without making learners runbundle install
locally, I think the best course of action is to introduce it for them on a branch.
💯 agreed as well since we are not having any local instance of the project. I had also checked the circleci ci and noticed that the steps still get executed since there is a fail safe step to compile and build the dependency if no Gemfile.lock is found. This also makes the build a little slow
@ppremk I think somewhere along the way we lost a test. I envisioned a link checker to be an initial use of CI, but I also envisioned a second use of CI where we would add a new feature to docsify (for example, adding a cover page) and then a unit test to ensure that feature works (for example, visiting the deployed URL should return the cover page). Does that make sense?
Let's sync on this to see how we can extend existing steps with an extra test case 🙂
^ let's keep using the branch:
configure-test-automation
👍
^ let's do this for the learner on the branch automatically
These files are already in there. I will proceed to add the Gemfile.lock
^ this is the part we'll need the learner to do manually, please remove it from the branch
What say you if we get the end user to update the syntax with the correct snippet? We need this file in the previous step for it to pass the build
👋 @ppremk I’ve spent some time working on this and think I can make the changes I described. However, I’m still spending some time thinking about the unit test.
Let's sync on this. 🙂
@ppremk for Step 1: Enable continuous integration, it won't work without a Gemfile:
Would you be ok if this line was commented out first and then in the subsequent steps it is enabled?
@ppremk I spent some time today building on your amazing work and created this template repo. I think any of the quirks that I brought up here are addressed there. The course is also on staging using the new template. Feel free to close this issue unless there's remaining items you want to address. I'm also going to close any remaining template repo issues. I'll open new ones later for tasks like ensuring that all commits are made by githubteacher.
@hectorsector thats really awesome! I will peek into the template repo and also review the course flow on staging. Based on the template name, I am assuming that we will be having an additional template for the travis ci course? I shall keep an eye out for any new issues you will post 🙂
closing in favor of #38
Hey @hectorsector here are the proposed flow based on the changes which I have tested on this repo. The commit history would help tell the story. @a-a-ron this might help giving you a little context on the flow of the course and help in writing the response.
Some steps were either combined or dropped in this additional feedback based on the first round of logic iteration that you have done in the closed PR
Address feedback for first round of logic #33
Course Steps (new template branch master)
1. Enable continuous integration (new template branch)
Note: Steps 1 to 5 was required to be able to start building directly in Circle CI and also trigger the
status.context==ci/circlecir
. Verified to build a new CI using a new repo without reproducing steps 1 to 5 the the CI project did not build2. Configure your CI providerthis step would be not required since steps 1.1 to 1.5 covers this requirement3. Merge the configurationthis step would be not required since steps 1.1 to 1.5 covers this requirement4.
Add ValidationEnable/Configure Test Automation (new template branch)echo out
command withbundle execute rake test
Note: The Gemfile.lock is a generated file when the project is compiled, I am in two minds about adding this file as part of this step. Will need to test if the test works without the Gemfile.lock
5. Protect a branch
ci/circleci: build
6.
Fix the broken buildAdd/Configure Test (new template branch)add test
7.
Merge code with a successful buildFix broken build (new template branch)8.
Add a unit testMerge code with a successful build9.
Merge your unit testDeploy10. Deploy