/ .github / workflows / test.yml
test.yml
 1  name: Lint & Test
 2  
 3  on:
 4    push:
 5      branches: [ main ]
 6    pull_request:
 7      branches: [ main ]
 8  
 9  jobs:
10    test:
11      name: Run Tests
12      runs-on: ubuntu-latest
13  
14      steps:
15      - uses: actions/checkout@v2
16  
17      - name: Set up Rust
18        uses: actions-rs/toolchain@v1
19        with:
20          profile: minimal
21          toolchain: stable
22          components: rustfmt, clippy
23          override: true
24  
25      - name: Run Clippy (Linter)
26        run: cargo clippy -- -D warnings
27  
28      - name: Check Code Formatting
29        run: cargo fmt -- --check
30  
31      - name: Run Tests
32        run: cargo test --verbose