Skip to content

Commit fc482f9

Browse files
committed
Add workflows
1 parent d898f59 commit fc482f9

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
name: Test
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- name: Update rustup
11+
run: rustup self update
12+
- name: Install Rust
13+
run: |
14+
rustup set profile minimal
15+
rustup toolchain install nightly -c rust-docs
16+
rustup default nightly
17+
- name: Install mdbook
18+
run: |
19+
mkdir bin
20+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
21+
echo "$(pwd)/bin" >> $GITHUB_PATH
22+
- name: Report versions
23+
run: |
24+
rustup --version
25+
rustc -Vv
26+
mdbook --version
27+
- name: Run tests
28+
run: mdbook test
29+
- name: Style checks
30+
run: (cd style-check && cargo run -- ../src)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# The Rust Language Reference
22

3+
![Build Status](https://github.com/rust-lang-cn/book-cn/workflows/CI/badge.svg)
4+
35
This document is the primary reference for the Rust programming language.
46

57
This document is not normative. It may include details that are specific

0 commit comments

Comments
 (0)