]> git.lizzy.rs Git - rust.git/blob - .github/workflows/remark.yml
Auto merge of #78399 - vn-ki:gsgdt-graphviz, r=oli-obk
[rust.git] / .github / workflows / remark.yml
1 name: Remark
2
3 on:
4   push:
5     branches:
6       - auto
7       - try
8   pull_request:
9     paths:
10     - '**.md'
11
12 jobs:
13   remark:
14     runs-on: ubuntu-latest
15
16     steps:
17     # Setup
18     - name: Checkout
19       uses: actions/checkout@v2.3.3
20
21     - name: Setup Node.js
22       uses: actions/setup-node@v1.4.4
23
24     - name: Install remark
25       run: npm install remark-cli remark-lint remark-lint-maximum-line-length remark-preset-lint-recommended
26
27     # Run
28     - name: Check *.md files
29       run: git ls-files -z '*.md' | xargs -0 -n 1 -I {} ./node_modules/.bin/remark {} -u lint -f > /dev/null
30
31   # These jobs doesn't actually test anything, but they're only used to tell
32   # bors the build completed, as there is no practical way to detect when a
33   # workflow is successful listening to webhooks only.
34   #
35   # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
36
37   end-success:
38     name: bors remark test finished
39     if: github.event.pusher.name == 'bors' && success()
40     runs-on: ubuntu-latest
41     needs: [remark]
42
43     steps:
44       - name: Mark the job as successful
45         run: exit 0
46
47   end-failure:
48     name: bors remark test finished
49     if: github.event.pusher.name == 'bors' && (failure() || cancelled())
50     runs-on: ubuntu-latest
51     needs: [remark]
52
53     steps:
54       - name: Mark the job as a failure
55         run: exit 1