1name: CI 2 3on: 4 workflow_dispatch: 5 push: 6 branches: [ master ] 7 pull_request: 8 branches: [ master ] 9 10env: 11 CARGO_TERM_COLOR: always 12 13jobs: 14 build: 15 name: ${{ matrix.rust }} 16 runs-on: ubuntu-latest 17 strategy: 18 fail-fast: false 19 matrix: 20 rust: 21 - 1.30.0 22 - stable 23 - beta 24 - nightly 25 steps: 26 - uses: actions/checkout@v2 27 - uses: actions-rs/toolchain@v1 28 with: 29 toolchain: ${{ matrix.rust }} 30 default: true 31 profile: minimal 32 - run: rustup component add rustfmt-preview 33 - name: cargo fmt --all -- --check if stable 34 run: | 35 if [ "${{ matrix.rust }}" = "stable" ]; then 36 cargo fmt --all -- --check 37 fi 38 - run: | 39 cargo build --verbose 40 - run: | 41 cargo test --verbose 42