|
19 | 19 | run: npm install -g markdownlint-cli |
20 | 20 | - name: Run Markdownlint |
21 | 21 | run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml |
| 22 | + |
| 23 | + # If the above check failed, post a comment on the PR explaining the failure |
| 24 | + - name: Post PR comment |
| 25 | + if: failure() |
| 26 | + uses: mshick/add-pr-comment@v1 |
| 27 | + with: |
| 28 | + message: | |
| 29 | + ## Markdown linting is failing |
| 30 | +
|
| 31 | + To keep the code consistent with lots of contributors, we run automated code consistency checks. |
| 32 | + To fix this CI test, please run: |
| 33 | +
|
| 34 | + * Install `markdownlint-cli` |
| 35 | + * On Mac: `brew install markdownlint-cli` |
| 36 | + * Everything else: [Install `npm`](https://www.npmjs.com/get-npm) then [install `markdownlint-cli`](https://www.npmjs.com/package/markdownlint-cli) (`npm install -g markdownlint-cli`) |
| 37 | + * Fix the markdown errors |
| 38 | + * Automatically: `markdownlint . --config .github/markdownlint.yml --fix` |
| 39 | + * Manually resolve anything left from `markdownlint . --config .github/markdownlint.yml` |
| 40 | +
|
| 41 | + Once you push these changes the test should pass, and you can hide this comment :+1: |
| 42 | +
|
| 43 | + We highly recommend setting up markdownlint in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help! |
| 44 | +
|
| 45 | + Thanks again for your contribution! |
| 46 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + allow-repeats: false |
| 48 | + |
| 49 | + |
22 | 50 | YAML: |
23 | 51 | runs-on: ubuntu-latest |
24 | 52 | steps: |
|
29 | 57 | - name: Install yaml-lint |
30 | 58 | run: npm install -g yaml-lint |
31 | 59 | - name: Run yaml-lint |
32 | | - run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yml") |
| 60 | + run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yml" -o -name "*.yaml") |
| 61 | + |
| 62 | + # If the above check failed, post a comment on the PR explaining the failure |
| 63 | + - name: Post PR comment |
| 64 | + if: failure() |
| 65 | + uses: mshick/add-pr-comment@v1 |
| 66 | + with: |
| 67 | + message: | |
| 68 | + ## YAML linting is failing |
| 69 | +
|
| 70 | + To keep the code consistent with lots of contributors, we run automated code consistency checks. |
| 71 | + To fix this CI test, please run: |
| 72 | +
|
| 73 | + * Install `yaml-lint` |
| 74 | + * [Install `npm`](https://www.npmjs.com/get-npm) then [install `yaml-lint`](https://www.npmjs.com/package/yaml-lint) (`npm install -g yaml-lint`) |
| 75 | + * Fix the markdown errors |
| 76 | + * Run the test locally: `yamllint $(find . -type f -name "*.yml" -o -name "*.yaml")` |
| 77 | + * Fix any reported errors in your YAML files |
| 78 | +
|
| 79 | + Once you push these changes the test should pass, and you can hide this comment :+1: |
| 80 | +
|
| 81 | + We highly recommend setting up yaml-lint in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help! |
| 82 | +
|
| 83 | + Thanks again for your contribution! |
| 84 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 85 | + allow-repeats: false |
| 86 | + |
| 87 | + |
33 | 88 | nf-core: |
34 | 89 | runs-on: ubuntu-latest |
35 | 90 | steps: |
|
0 commit comments