• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Rust
2
3on:
4  push:
5    branches: [main]
6  pull_request:
7
8env:
9  CARGO_TERM_COLOR: always
10
11jobs:
12  build:
13    runs-on: ubuntu-latest
14    steps:
15      - uses: actions/checkout@v2
16      - name: Build
17        run: cargo build
18      - name: Run tests
19        run: cargo test
20      - name: Run clippy
21        uses: actions-rs/clippy-check@v1
22        with:
23          token: ${{ secrets.GITHUB_TOKEN }}
24
25  format:
26    runs-on: ubuntu-latest
27    steps:
28      - uses: actions/checkout@v2
29      - name: Format Rust code
30        run: cargo fmt --all -- --check
31