✅ modify github actions #2
Workflow file for this run
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
name: Can be run as CLI | |
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.x' | |
- 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 |