From 24b3b0315317f89f69f82f7a90e48daa2c3cd98c Mon Sep 17 00:00:00 2001 From: Mica White Date: Tue, 8 Aug 2023 17:29:09 -0400 Subject: Create pr_check.yml --- .github/workflows/pr_check.yml | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/pr_check.yml (limited to '.github') 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 -- cgit v1.2.3