diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1b5bf7e..78808cb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,13 +1,25 @@ name: Rust -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: {} jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions-rs/cargo@v1 + with: + command: test + + check-format: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: -- --check