-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5945094
commit d846955
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CLI Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Install CLI globally | ||
run: npm install -g . | ||
|
||
- name: Test CLI | ||
run: | | ||
# Run the CLI with the example file | ||
OUTPUT=$(ipssm test/data/IPSSMexample.csv test.csv) | ||
echo "$OUTPUT" | ||
# Check the stout for the expected output | ||
EXPECTED="✅ Annotated file written to: test.csv\nFile annotated successfully." | ||
if [ "$OUTPUT" = "$EXPECTED" ]; then | ||
echo "Output matches expected" | ||
else | ||
echo "Output does not match expected" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# Node modules | ||
node_modules | ||
|
||
# Compiled JS files | ||
dist | ||
|
||
# Data test files | ||
test/data/*-out.* | ||
dist | ||
test.csv |