Skip to content

Commit

Permalink
pre-commit hook
Browse files Browse the repository at this point in the history
closes #150

Co-authored-by: Samyak S Sarnayak <samyak201@gmail.com>
  • Loading branch information
mightyiam and Samyak2 committed May 5, 2022
1 parent a128872 commit c51b3eb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/ci.yml
Expand Up @@ -6,26 +6,15 @@ on:
pull_request:
branches: [master]

env:
CARGO_TERM_COLOR: always

jobs:
all:
runs-on: ubuntu-latest

env:
RUSTFLAGS: --deny warnings

steps:
- uses: actions/checkout@v3
- name: Update toolchain
run: rustup update
- uses: Swatinem/rust-cache@v1
- name: Test
run: cargo test
- name: Clippy
run: cargo clippy
- name: Check formatting
run: cargo fmt --check
- name: Make documentation
run: cargo doc
- run: cargo install cargo-make
- run: cargo make ci

29 changes: 29 additions & 0 deletions Makefile.toml
@@ -0,0 +1,29 @@
[config]
default_to_workspace = false

[env]
CARGO_TERM_COLOR = "always"

[tasks.pre-commit]
env = { RUSTFLAGS = "--deny warnings" }
dependencies = ["test", "clippy", "doc", "check_fmt"]

[tasks.ci]
env = { RUSTFLAGS = "--deny warnings" }
dependencies = ["test", "clippy", "doc", "check_fmt"]

[tasks.test]
command = "cargo"
args = ["test"]

[tasks.clippy]
command = "cargo"
args = ["clippy", "--all-targets"]

[tasks.doc]
command = "cargo"
args = ["doc"]

[tasks.check_fmt]
command = "cargo"
args = ["fmt", "--check"]

0 comments on commit c51b3eb

Please sign in to comment.