summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
blob: bd48ee99a57073d5e5f5e3ec736a812bc3238ba9 (plain)
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
name: Cargo Build & Test

on:
  push:
  pull_request:


env: 
  CARGO_TERM_COLOR: always


jobs:
  test:
    name: Rust project - latest
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Install toolchain
        run: |
          rustup update stable
          rustup default stable
          rustup component add clippy

      - name: Lint
        run: |
          cd racer-tracer
          cargo fmt -- --check
          cargo clippy -- -D warnings

      - name: Test
        run: |
          cd racer-tracer
          cargo check
          cargo test --all

      - name: Build
        run: |
          cd racer-tracer
          cargo build --release