Skip to content

Commit

Permalink
Add Tests and refactor for modularity
Browse files Browse the repository at this point in the history
There are (some) tests now and functionality has mostly been refactored out
of fn main into individual testable functions. Missing a full integration test
still.
  • Loading branch information
rickh94 committed Aug 25, 2021
1 parent 12e36bd commit 982963e
Show file tree
Hide file tree
Showing 8 changed files with 820 additions and 209 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ jobs:
override: true
target: ${{ matrix.target }}
- uses: actions-rs/cargo@v1
name: Build
name: Test
with:
toolchain: stable
args: --target ${{ matrix.target }} --release --locked
use-cross: ${{ matrix.cross }}
- uses: actions-rs/cargo@v1
name: Build for Release
with:
command: build
args: --target ${{ matrix.target }} --release --locked
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ jobs:
command: build
args: --target ${{ matrix.target }}
use-cross: ${{ matrix.cross }}
- uses: actions-rs/cargo@v1
name: Build
with:
command: test
args: --target ${{ matrix.target }}
use-cross: ${{ matrix.cross }}
95 changes: 91 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ version = "0.1.1"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "rustmon"

[dependencies]
notify = "4.0.17"
colored = "2"
clap = { version = "3.0.0-beta.4", features = ["yaml"]}
regex = "1"
regex = "1"

[dev-dependencies]
tempfile = "^3.2.0"
4 changes: 4 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage-html:
grcov ./target/debug -s . -t html --llvm --branch --ignore-not-existing -o ./target/debug/coverage


4 changes: 2 additions & 2 deletions src/cli.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rustmon
version: "0.1.0"
version: "0.1.1"
author: Rick Henry <[email protected]>
about: Automatically restarts a script when files change on a path
args:
Expand All @@ -19,7 +19,7 @@ args:
short: r
long: recursive
about: Set whether watches should be recursive or not
- watch:
- watches:
short: w
long: watch
multiple_values: true
Expand Down
Loading

0 comments on commit 982963e

Please sign in to comment.