|
11 | 11 | types: [opened, repoened, synchronize]
|
12 | 12 |
|
13 | 13 | jobs:
|
14 |
| - native-test: |
| 14 | + lint: |
15 | 15 | runs-on: ${{ matrix.os }}
|
16 | 16 | strategy:
|
17 | 17 | fail-fast: false
|
18 | 18 | matrix:
|
19 |
| - rust_toolchain: [nightly, stable, 1.49.0] |
20 | 19 | os: [ubuntu-latest, windows-latest, macOS-latest]
|
21 |
| - timeout-minutes: 20 |
| 20 | + timeout-minutes: 10 |
22 | 21 | steps:
|
23 | 22 | - uses: actions/checkout@v2
|
24 |
| - - name: Install Rust ${{ matrix.rust_toolchain }} |
| 23 | + - name: Install Rust |
25 | 24 | uses: actions-rs/toolchain@v1
|
26 | 25 | with:
|
27 |
| - toolchain: ${{ matrix.rust_toolchain }} |
| 26 | + toolchain: stable |
28 | 27 | profile: minimal
|
29 | 28 | components: clippy
|
30 | 29 | default: true
|
31 |
| - - name: Update |
32 |
| - uses: actions-rs/cargo@v1 |
33 |
| - with: |
34 |
| - command: update |
35 |
| - args: --manifest-path=Cargo.toml |
36 | 30 | - name: Clippy
|
37 | 31 | uses: actions-rs/cargo@v1
|
38 | 32 | with:
|
39 | 33 | command: clippy
|
40 |
| - args: -- -Arenamed-and-removed-lints -Aclippy::unknown-clippy-lints -Aunknown-lints |
| 34 | + args: -- -Dclippy::correctness -Dclippy::complexity -Dclippy::perf -Dunsafe_code -Dunreachable_pub -Dunused |
| 35 | + |
| 36 | + doc: |
| 37 | + runs-on: ubuntu-latest |
| 38 | + timeout-minutes: 10 |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v2 |
| 41 | + - name: Install Rust |
| 42 | + uses: actions-rs/toolchain@v1 |
| 43 | + with: |
| 44 | + toolchain: nightly |
| 45 | + profile: minimal |
| 46 | + default: true |
41 | 47 | - name: Doc
|
42 | 48 | uses: actions-rs/cargo@v1
|
43 | 49 | with:
|
44 | 50 | command: doc
|
45 | 51 | args: --all-features --manifest-path=Cargo.toml
|
46 | 52 | env:
|
47 |
| - RUSTDOCFLAGS: --cfg docsrs -Arenamed-and-removed-lints -Aunknown-lints |
48 |
| - if: ${{ matrix.rust_toolchain == 'nightly' }} |
| 53 | + RUSTDOCFLAGS: --cfg docsrs -Dmissing_docs -Dbroken_intra_doc_links |
| 54 | + |
| 55 | + test: |
| 56 | + runs-on: ${{ matrix.os }} |
| 57 | + strategy: |
| 58 | + fail-fast: false |
| 59 | + matrix: |
| 60 | + rust_toolchain: [nightly, stable, 1.49.0] |
| 61 | + os: [ubuntu-latest, windows-latest, macOS-latest] |
| 62 | + timeout-minutes: 20 |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v2 |
| 65 | + - name: Install Rust ${{ matrix.rust_toolchain }} |
| 66 | + uses: actions-rs/toolchain@v1 |
| 67 | + with: |
| 68 | + toolchain: ${{ matrix.rust_toolchain }} |
| 69 | + profile: minimal |
| 70 | + default: true |
49 | 71 | - name: Build without features
|
50 | 72 | uses: actions-rs/cargo@v1
|
51 | 73 | with:
|
52 | 74 | command: build
|
53 | 75 | args: --no-default-features --manifest-path=Cargo.toml
|
54 |
| - env: |
55 |
| - RUSTFLAGS: -Arenamed-and-removed-lints -Aunknown-lints -Arenamed-and-removed-lints |
56 |
| - - name: Build with `google` feature |
57 |
| - uses: actions-rs/cargo@v1 |
58 |
| - with: |
59 |
| - command: build |
60 |
| - args: --manifest-path=Cargo.toml --features=google |
61 |
| - env: |
62 |
| - RUSTFLAGS: -Arenamed-and-removed-lints -Aunknown-lints -Arenamed-and-removed-lints |
63 | 76 | - name: Test with all features
|
64 | 77 | uses: actions-rs/cargo@v1
|
65 | 78 | with:
|
66 | 79 | command: test
|
67 | 80 | args: --manifest-path=Cargo.toml --all-features -- --nocapture
|
68 |
| - env: |
69 |
| - RUSTFLAGS: -Arenamed-and-removed-lints -Aunknown-lints -Arenamed-and-removed-lints |
|
0 commit comments