/rust-problem-matchers

GitHub Action to setup Problem Matchers for Rust.

Primary LanguageJavaScript

rust-problem-matchers

GitHub Action to setup Problem Matchers for Rust.

Usage

Add this action as a step before running Rust toolchain:

name: test

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          components: rustfmt, clippy
      - uses: r7kamura/rust-problem-matchers@v1
      - uses: actions-rs/cargo@v1
        name: cargo fmt
        with:
          command: fmt
          args: --all -- --check
      - uses: actions-rs/cargo@v1
        name: cargo build
        with:
          command: build
      - uses: actions-rs/cargo@v1
        name: cargo clippy
        with:
          command: clippy
          args: -- -D warnings
      - uses: actions-rs/cargo@v1
        name: cargo test
        with:
          command: test

Note

This action does not currently support ANSI colored output, so do not set term.color or CARGO_TERM_COLOR to always.

Screenshot

screenshot