when: event: [pull_request] branch: [main, develop] steps: quality-check: image: node:18-alpine commands: - npm ci - npm run lint - npm run type-check - npm run test:unit -- --coverage - | COVERAGE=$(cat coverage/coverage-summary.json | grep -o '"lines":{"pct":[0-9.]*' | grep -o '[0-9.]*$') if [ $(echo "$COVERAGE < 70" | bc -l) -eq 1 ]; then echo "Coverage $COVERAGE% is below threshold 70%" exit 1 fi