Skip to content

Commit

Permalink
ci: Add check ci workflow (#7)
Browse files Browse the repository at this point in the history
* ci: add check ci workflow

* docs: add badge ci status to new readme

* docs: fix view of badge

* ci: add more paths to watch
  • Loading branch information
SergioRibera authored May 30, 2024
1 parent d3be248 commit 8b6884e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check Format and Code Quality
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
branches:
- main
paths:
- "src/**/**.rs"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"

jobs:
check-fmt:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: check format
run: |
cargo fmt --all --check
check-clippy:
needs: [check-fmt]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: cargo clippy
run: |
cargo clippy -- -D warnings
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Simple commits

<div align="center">

[![Check CI](https://github.com/romancitodev/simple-commits/actions/workflows/checks.yml/badge.svg?branch=main)](https://github.com/romancitodev/simple-commits/actions/workflows/checks.yml)

</div>

A little CLI written in rust to improve your dirty commits into **conventional** ones.
## 👀 Demo _(coming soon)_

Expand Down

0 comments on commit 8b6884e

Please sign in to comment.