on: push: branches: [ master ] pull_request: branches: [ master ] env: CARGO_TERM_COLOR: always jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable - name: Run cargo test uses: actions-rs/cargo@v1 with: command: test lints: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable components: clippy - name: Run cargo fmt (check if all code is rustfmt-ed) uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check - name: Run cargo clippy (deny warnings) uses: actions-rs/cargo@v1 with: command: clippy args: -- -D warnings