Skip to content

Commit

Permalink
add first test for all command
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofferlind committed Nov 6, 2022
1 parent 116b3ff commit ea46da8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Minimalist cli tool for building many similar components in a monorepo. Calculates a hash of the file content of a component and checks for existing artifacts with that hash to determine whether to build the component.

### Example configurations
Example configurations can be found in [examples/](./examples), [.knega.root.yml](./examples/.knega.root.yml) should be at project root and [.component.yml](./examples/.component.yml) should exist for every component. Check [examples/full](./examples/full/) for an example with sample components.
Example configurations can be found in [examples/](./examples), [.knega.root.yml](./examples/.knega.root.yml) should be at project root and [.component.yml](./examples/.component.yml) should exist for every component. Check [examples/full](./examples/full/) for an example with sample components (used by tests).

## Usage
`knega changed/all <action>` where action is a set of commands defined in configuration. It will execute those commands for all or changed components with that action defined.
Expand Down
5 changes: 5 additions & 0 deletions test/build.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@
[[ "$output" = *"example-1"*"Artifacts found"* ]]
[[ "$output" = *"example-2"*"Artifacts found"* ]]
}

@test "knega all build should build everything even if artifacts already exist" {
run $KNEGA all build
[[ "$output" = *"Created 2 jobs"* ]]
}

0 comments on commit ea46da8

Please sign in to comment.