Skip to content

feat: add jest for device auto tests #10

feat: add jest for device auto tests

feat: add jest for device auto tests #10

Workflow file for this run

name: Run Tests
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Check for 'only' in tests.json files
run: |
find manufacturers -name 'tests.json' | while IFS= read -r file; do
if [ ! -s "$file" ]; then
continue # Skip empty files
fi
if grep -Pzo '(?s)(?<!\w)"only"\s*:' "$file"; then
echo "❌ Error: Found 'only' key in $file"
exit 1
else
echo "✅ No 'only' keys found in $file"
fi
done
shell: bash
- name: Run tests
run: npm test