Skip to content

Add CI, smoke tests, fixtures, and improve HTML conversion handling - #5

Merged
etherlink-intern merged 1 commit into
mainfrom
codex/review-repository
May 31, 2026
Merged

etherlink-intern merged 1 commit into
mainfrom
codex/review-repository

Conversation

@etherlink-intern

Copy link
Copy Markdown
Owner

Motivation

  • Run the unit test suite and CLI smoke tests automatically on PRs and pushes to main to prevent regressions.
  • Provide deterministic CLI fixture tests and expected outputs to validate converter behavior across HTML/CSV/JSON/plain text inputs.
  • Improve HTML conversion to ignore document metadata in <head> and normalize whitespace so output is more predictable.

Description

  • Add GitHub Actions workflow /.github/workflows/ci.yml to run swift test and Scripts/smoke-test.sh on pull requests, pushes to main, and manual dispatch.
  • Add Scripts/smoke-test.sh which builds the swift-markitdown product and compares CLI output for fixtures with files in Tests/Expected using diff.
  • Add test fixtures under Tests/Fixtures/ and matching expected Markdown files under Tests/Expected/, and update Tests/SwiftMarkItDownTests/SwiftMarkItDownTests.swift to exercise those cases.
  • Update Sources/SwiftMarkItDown/Converters/HTMLConverter.swift to strip the <head> block, trim per-line whitespace, collapse extra blank lines, and preserve HTML entity decoding.

Testing

  • Ran swift test and the core unit test suite in SwiftMarkItDownTests, and all tests passed.
  • Ran Scripts/smoke-test.sh which built the CLI and validated note.txt, page.html, table.csv, and data.json against expected outputs, and all smoke-test cases passed.
  • CI workflow added will execute the same swift test and Scripts/smoke-test.sh checks on GitHub Actions.

Codex Task

@etherlink-intern
etherlink-intern marked this pull request as ready for review May 31, 2026 17:44
@etherlink-intern
etherlink-intern merged commit ac0ec06 into main May 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant