Skip to content

Commit

Permalink
Add basic CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmattryan committed Oct 30, 2024
1 parent f542897 commit 7dca1e1
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Format

on:
pull_request:
push:
branches: [main, develop]

jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt

- name: Format Code
run: cargo +nightly fmt
24 changes: 24 additions & 0 deletions .github/workflows/ci.lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint

on:
pull_request:
push:
branches: [main, develop]

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: clippy

- name: Lint Code
run: cargo +nightly clippy
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# `fnote`

[![Format](https://github.com/blackboxaudio/fnote/actions/workflows/ci.fmt.yml/badge.svg)](https://github.com/blackboxaudio/fnote/actions/workflows/ci.fmt.yml)
[![Lint](https://github.com/blackboxaudio/fnote/actions/workflows/ci.lint.yml/badge.svg)](https://github.com/blackboxaudio/fnote/actions/workflows/ci.lint.yml)
[![Version: v0.1.0](https://img.shields.io/badge/Version-v0.1.0-blue.svg)](https://github.com/blackboxaudio/fnote)
[![License](https://img.shields.io/badge/License-MIT-yellow)](https://github.com/blackboxaudio/fnote/blob/develop/LICENSE)

> CLI tool for converting musical notes and frequencies 🧮
## Overview
Expand Down
12 changes: 12 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
comment_width = 120
edition = "2021"
format_code_in_doc_comments = true
group_imports = "StdExternalCrate"
imports_granularity = "Crate"
max_width = 120
normalize_comments = true
normalize_doc_attributes = true
reorder_imports = true
trailing_comma = "Vertical"
trailing_semicolon = true
wrap_comments = true
4 changes: 1 addition & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ pub type FNoteResult<T> = std::result::Result<T, FNoteError>;

/// Error variants for the `fnote` program.
#[derive(Debug, PartialEq, thiserror::Error)]
pub enum FNoteError {

}
pub enum FNoteError {}

0 comments on commit 7dca1e1

Please sign in to comment.