1name: Rust 2 3on: 4 push: 5 branches: [master] 6 pull_request: 7 branches: [master] 8 9jobs: 10 build: 11 runs-on: ubuntu-latest 12 13 steps: 14 - uses: actions/checkout@v2 15 # Use MSRV for the build job 16 - uses: actions-rs/toolchain@v1 17 with: 18 toolchain: 1.32 19 default: true 20 profile: minimal 21 - name: Build default 22 uses: actions-rs/cargo@v1 23 with: 24 command: build 25 - name: Build with unicode segmentation on 26 uses: actions-rs/cargo@v1 27 with: 28 args: --features unicode 29 command: build 30 # Use stable for other jobs 31 - uses: actions-rs/toolchain@v1 32 with: 33 toolchain: stable 34 default: true 35 profile: minimal 36 components: rustfmt, clippy 37 - name: Run tests 38 uses: actions-rs/cargo@v1 39 with: 40 command: test 41 - name: Check formatting 42 uses: actions-rs/cargo@v1 43 with: 44 command: fmt 45 args: -- --check 46 - name: Catch common mistakes 47 uses: actions-rs/cargo@v1 48 with: 49 command: clippy 50 args: --all-targets -- -D warnings 51