Skip to content

Commit

Permalink
Add GitHub Action for Pull Requests
Browse files Browse the repository at this point in the history
Signed-off-by: Stavros Panakakis <stavrospanakakis@gmail.com>
  • Loading branch information
Stavrospanakakis committed Jun 25, 2023
1 parent e463cb3 commit 63f60f2
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "Checks"

on:
pull_request:

jobs:
check:
name: "Cargo check"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3

- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true

- uses: "actions-rs/cargo@v1"
with:
command: "check"

test:
name: "Cargo test"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3

- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true

- uses: "actions-rs/cargo@v1"
with:
command: "test"

fmt:
name: "Cargo format"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3

- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true

- run: "rustup component add rustfmt"

- uses: "actions-rs/cargo@v1"
with:
command: "fmt"
args: "--all -- --check"

clippy:
name: "Cargo clippy"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: actions/checkout@v3

- uses: "actions-rs/toolchain@v1"
with:
profile: "minimal"
toolchain: "stable"
override: true

- run: "rustup component add clippy"

- uses: "actions-rs/cargo@v1"
with:
command: "clippy"
args: "-- -D warnings"

0 comments on commit 63f60f2

Please sign in to comment.