index : rust-template
Feature rich rust template
about summary refs log tree commit diff
rust-template / .github / workflows / ci.yml
-rw-r--r-- blob 4f50659c5246aa432ff545d798b01100df259d96 694 bytes (plain)
1
name: CI
2
3
on:
4
  push:
5
    branches: [main]
6
  pull_request:
7
    branches: [main]
8
9
env:
10
  CARGO_TERM_COLOR: always
11
12
jobs:
13
  ci:
14
    name: Check, Lint & Test
15
    runs-on: ubuntu-latest
16
    steps:
17
      - uses: actions/checkout@v4
18
19
      - uses: dtolnay/rust-toolchain@stable
20
        with:
21
          components: rustfmt, clippy
22
23
      - uses: Swatinem/rust-cache@v2
24
25
      - name: Check formatting
26
        run: cargo fmt --all -- --check
27
28
      - name: Lint with Clippy
29
        run: cargo clippy --all-targets --all-features -- -D warnings
30
31
      - name: Build
32
        run: cargo build --all-targets --verbose
33
34
      - name: Run tests
35
        run: cargo test --all-targets --all-features --verbose