• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15name: Rust
16
17on:
18  push:
19    branches: [ master ]
20  pull_request:
21    branches: [ master ]
22
23env:
24  CARGO_TERM_COLOR: always
25
26jobs:
27  lints:
28    runs-on: ubuntu-latest
29    steps:
30    - uses: actions/checkout@v2
31
32    - name: cargo fmt
33      run: cargo fmt -- --check --files-with-diff
34    - name: cargo clippy
35      run: cargo clippy --verbose
36
37  tests:
38    runs-on: ubuntu-latest
39    steps:
40    - uses: actions/checkout@v2
41
42    - name: cargo test
43      run: cargo test --verbose --all
44    - name: cargo doc
45      run: cargo doc --verbose
46
47  miri:
48    runs-on: ubuntu-latest
49    steps:
50    - uses: actions/checkout@v2
51
52    - name: rustup component add miri
53      run: rustup +nightly-2021-10-10 component add miri
54    - name: cargo miri test
55      run: cargo +nightly-2021-10-10 miri test --verbose