1name: Rust 2 3on: 4 push: 5 branches: [ "main" ] 6 pull_request: 7 branches: [ "main" ] 8 9env: 10 CARGO_TERM_COLOR: always 11 12jobs: 13 build: 14 15 runs-on: ubuntu-latest 16 17 steps: 18 - uses: actions/checkout@v3 19 - name: Build 20 run: cargo build --verbose 21 - name: Run tests 22 run: cargo test --verbose 23 24 fmt: 25 runs-on: ubuntu-latest 26 steps: 27 - uses: actions/checkout@v3 28 29 - name: Check formatting 30 run: cargo fmt --check 31 32 test: 33 runs-on: ubuntu-latest 34 steps: 35 - uses: actions/checkout@v3 36 37 - name: Run tests 38 run: cargo test 39