fix: handle htmlparser2 script/style node types #17
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| name: Test & Verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Smoke test — CLI | |
| run: node src/cli.mjs https://example.com -q | |
| - name: Smoke test — MCP | |
| run: | | |
| RESULT=$(echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node start.mjs 2>/dev/null) | |
| echo "$RESULT" | python3 -c "import sys,json; d=json.load(sys.stdin); assert len(d['result']['tools']) == 2" | |
| echo "MCP tools/list OK" | |
| - name: Auto patch tag | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") | |
| VERSION=${LATEST_TAG#v} | |
| IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION" | |
| PATCH=$((PATCH + 1)) | |
| NEW_TAG="v${MAJOR}.${MINOR}.${PATCH}" | |
| if git describe --exact-match HEAD 2>/dev/null; then | |
| echo "Commit already tagged, skipping" | |
| exit 0 | |
| fi | |
| git tag -a "$NEW_TAG" -m "Auto patch $NEW_TAG | |
| Install: npm install rawdoc" | |
| git push origin "$NEW_TAG" | |
| echo "Tagged $NEW_TAG" | |
| - name: Generate job summary | |
| if: always() | |
| env: | |
| COMMIT_SHA: ${{ github.sha }} | |
| BUILD_NUMBER: ${{ github.run_number }} | |
| run: | | |
| SHORT_SHA="${COMMIT_SHA:0:7}" | |
| BUILD_DATE=$(date -u +"%Y-%m-%d %H:%M UTC") | |
| cat >> "$GITHUB_STEP_SUMMARY" <<EOF | |
| ## rawdoc CI Results | |
| | Check | Status | | |
| |-------|--------| | |
| | CLI Smoke Test | Passed | | |
| | MCP Smoke Test | Passed | | |
| **Build:** #${BUILD_NUMBER} | **Commit:** ${SHORT_SHA} | **Date:** ${BUILD_DATE} | |
| EOF |