• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Rust
2
3on:
4  push:
5    branches: [ master ]
6  pull_request:
7    branches: [ master ]
8
9env:
10  CARGO_TERM_COLOR: always
11  RUSTFLAGS: -D warnings
12  RUST_BACKTRACE: 1
13
14jobs:
15  test:
16    runs-on: ubuntu-latest
17    strategy:
18      matrix:
19        rust:
20          - stable
21          - 1.54.0
22          - nightly
23
24    steps:
25      - uses: actions/checkout@v2
26      - uses: actions-rs/toolchain@v1
27        with:
28          profile: minimal
29          toolchain: ${{ matrix.rust }}
30          override: true
31      - name: Run tests
32        run: cargo test --verbose --all-features
33      - name: Run docs
34        run: cargo doc --verbose
35  format:
36    runs-on: ubuntu-latest
37    steps:
38      - name: Checkout
39        uses: actions/checkout@v2
40      - name: Install latest stable
41        uses: actions-rs/toolchain@v1
42        with:
43            toolchain: stable
44            override: true
45            components: rustfmt
46      - name: Run rustfmt
47        run: cargo fmt --all -- --check
48