diff options
Diffstat (limited to '.github/workflows/pr_check.yml')
| -rw-r--r-- | .github/workflows/pr_check.yml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml new file mode 100644 index 0000000..83ff4da --- /dev/null +++ b/.github/workflows/pr_check.yml @@ -0,0 +1,52 @@ +name: PR Check + +on: + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + fmt: + name: rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: clippy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Rust Toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: clippy + override: true + - name: Run rustfmt + run: cargo fmt -- --check + - name: Run clippy + run: cargo clippy --all-warnings --deny warnings + + test: + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true |
