forked from tailhook/rustyline
-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (40 loc) · 975 Bytes
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Rust
on:
push:
branches: [master]
paths:
- '**.rs'
- '**.toml'
- '.github/workflows/rust.yml'
pull_request:
paths:
- '**.rs'
- '**.toml'
- '.github/workflows/rust.yml'
- '*.md'
env:
RUST_BACKTRACE: 1
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: hecrj/setup-rust-action@v1
with:
components: rustfmt, clippy
- name: Build
run: cargo build --workspace --all-targets
- name: Run tests
run: cargo test --workspace --all-targets
- name: Run doctests
run: cargo test --workspace --doc
- name: Test features
if: matrix.os != 'windows-latest'
run: cargo test --workspace --all-targets --all-features
- name: Clippy
run: cargo clippy --workspace -- -D warnings
- name: Format
run: cargo fmt --all -- --check