Remove redundant comments from parser and SAX engine #20
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: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ['20', '22', '24'] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| with: | |
| cache: true | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm --filter @eksml/xml build | |
| - name: Type-check | |
| run: pnpm --filter @eksml/xml typecheck | |
| - name: Test | |
| if: matrix.node-version != '24' | |
| run: pnpm test | |
| - name: Test with coverage | |
| if: matrix.node-version == '24' | |
| run: pnpm --filter @eksml/xml test:coverage | |
| - name: Read coverage percentage | |
| if: matrix.node-version == '24' | |
| id: coverage | |
| run: | | |
| PCT=$(node -e "const s = JSON.parse(require('fs').readFileSync('eksml/coverage/coverage-summary.json','utf8')); console.log(s.total.lines.pct)") | |
| echo "pct=$PCT" >> "$GITHUB_OUTPUT" | |
| - name: Prettier | |
| run: pnpm prettier --check . | |
| - name: Upload dist | |
| if: matrix.node-version == '24' | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: dist | |
| path: eksml/dist | |
| - name: Update coverage badge | |
| if: matrix.node-version == '24' && github.ref == 'refs/heads/main' | |
| uses: schneegans/dynamic-badges-action@0e50b8bad39e7e1afd3e4e9c2b7dd145fad07501 # v1.8.0 | |
| with: | |
| auth: ${{ secrets.GIST_SECRET }} | |
| gistID: a81d2cb6fcee7165ffe898a8cfff9f4c | |
| filename: eksml-coverage.json | |
| label: coverage | |
| message: ${{ steps.coverage.outputs.pct }}% | |
| valColorRange: ${{ steps.coverage.outputs.pct }} | |
| minColorRange: 50 | |
| maxColorRange: 100 | |
| smoke: | |
| name: Smoke (Node 18) | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| with: | |
| cache: true | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: '18' | |
| - run: pnpm install --frozen-lockfile | |
| - name: Download dist | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: dist | |
| path: eksml/dist | |
| - name: Smoke test | |
| run: pnpm --filter @eksml/xml test:smoke |