test-with-actions
test-with-actions copied to clipboard
[Bug] Step "Run markdown lint" ends with en error
Summary
Step "Run markdown lint" ends with en error and the README.md
isn't updated
How to reproduce
-
Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab
-
Go to the Actions tab.
-
Click New workflow.
-
Search for "Simple workflow" and click Configure.
-
Name your workflow
ci.yml
. -
Update the workflow to remove all steps other than the "checkout" step.
-
Add the following step to your workflow:
- name: Run markdown lint run: | npm install remark-cli remark-preset-lint-consistent npx remark . --use remark-preset-lint-consistent --frail
Even after the code is indented properly in
ci.yml
, you will see a build error in GitHub Actions. We'll fix this in the next step. -
Click Start commit, and choose to make a new branch named
ci
. -
Click Propose a new file.
-
Click Create pull request.
-
Wait about 20 seconds then refresh this page (the one you're following instructions from). GitHub Actions will automatically update to the next step.
the task: "Update the code in the ci branch to get the test to pass." Clue: on line 18 there is a file. the issue has something to do with markdown syntax. i personally asked chat gpt, and thats how i reached to the solution after a long time.. good luck!
The following line is causing the warning and error
npx remark . --use remark-preset-lint-consistent --frail
The "." is asking to check all files for markdown syntax and its warning that "resume.md" is not following the syntax.
You can use "" or "*" to markdown as italics font. However when you use "consisent" as in the code above, then you should only use either "" or "" throughout the file. "resume.md" started using "_" and then later it also used "", hence the warning. (ref:https://www.npmjs.com/package/remark-lint-emphasis-marker/v/3.1.0)
The "--frail" will exits as failed when there is a warnings. (ref: Search for "--frail" in the URL:https://github.com/remarkjs/remark-lint)
In short if you where to replace *Git* with _Git_ in the "resume.md" then you will not have any errors.
But then we don't get to do the LAB as per the instructions provided.
Also the error Screenshots mentioned in Step2 - "Review required" and "Merging is blocked" never occurs, as there were no Branch rules already to cause this error.
If at the beginning of the Step1, we add a step to create a branch rule requiring one reviewer approval then we get this error when attempting to perform the pull request after creating the ci.yml.
Linking issue https://github.com/skills/test-with-actions/issues/48
@skills/technical-reviewers Would ya'll mind taking a look at this one? 👀 👍
This error is intentional.
Even after the code is indented properly in
ci.yml
, you will see a build error in GitHub Actions. We'll fix this in the next step.