fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB72 linesraw
1name: Remark
2
3on:
4  push:
5    branches:
6      - auto
7      - try
8  pull_request:
9    paths:
10    - '**.md'
11
12jobs:
13  remark:
14    runs-on: ubuntu-latest
15
16    steps:
17    # Setup
18    - name: Checkout
19      uses: actions/checkout@v3
20
21    - name: Setup Node.js
22      uses: actions/setup-node@v3
23      with:
24        node-version: '18.x'
25
26    - name: Install remark
27      run: npm install remark-cli remark-lint remark-lint-maximum-line-length remark-preset-lint-recommended remark-gfm
28
29    - name: Install mdbook
30      run: |
31        mkdir mdbook
32        curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.34/mdbook-v0.4.34-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
33        echo `pwd`/mdbook >> $GITHUB_PATH
34
35    # Run
36    - name: Check *.md files
37      run: ./node_modules/.bin/remark -u lint -f .
38
39    - name: Linkcheck book
40      run: |
41        rustup toolchain install nightly --component rust-docs
42        curl https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh -o linkcheck.sh
43        sh linkcheck.sh clippy --path ./book
44
45    - name: Build mdbook
46      run: mdbook build book
47
48  # These jobs doesn't actually test anything, but they're only used to tell
49  # bors the build completed, as there is no practical way to detect when a
50  # workflow is successful listening to webhooks only.
51  #
52  # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
53
54  end-success:
55    name: bors remark test finished
56    if: github.event.pusher.name == 'bors' && success()
57    runs-on: ubuntu-latest
58    needs: [remark]
59
60    steps:
61      - name: Mark the job as successful
62        run: exit 0
63
64  end-failure:
65    name: bors remark test finished
66    if: github.event.pusher.name == 'bors' && (failure() || cancelled())
67    runs-on: ubuntu-latest
68    needs: [remark]
69
70    steps:
71      - name: Mark the job as a failure
72        run: exit 1