Skip to content

Add integration tests and zimcheck - #76

Merged
benoit74 merged 1 commit into
openzim:mainfrom
masanta-s:integration-tests
Dec 3, 2026
Merged

benoit74 merged 1 commit into
openzim:mainfrom
masanta-s:integration-tests

Conversation

@masanta-s

Copy link
Copy Markdown
Contributor

Fixes #72

This adds an integration test suite, following the maps setup.

  • A new run-integration-tests job in the Tests workflow.
  • A daily workflow that runs the same job every day.

The job builds the Docker image and scrapes the Git docs (209 pages, about 10 seconds). Then it runs zimcheck from the zim-tools Docker image. Then it runs the tests in tests-integration inside the scraper image.

The tests check the metadata, the main page, and some pages and assets. They also check that every navbar link is in the ZIM and that search works. One test makes sure no page shows the "This documentation is missing" message.

The scraper does not retry failed HTTP requests. I saw one timeout in about 20 local runs, so the scrape step retries up to 3 times.

zimcheck passes on this ZIM. I did not use D3.js because it still has the missing landing page (#51) and external images (#21).

The new job also builds the Docker image, like the existing build_docker job. I can remove build_docker if you prefer, like in maps.

@masanta-s
masanta-s marked this pull request as ready for review December 1, 2026 15:42
@masanta-s

Copy link
Copy Markdown
Contributor Author

@benoit74 could you please review this when you are free ? Thanks!

@benoit74 benoit74 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.36%. Comparing base (8c1ef95) to head (5ac8e92).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   92.36%   92.36%           
=======================================
  Files           4        4           
  Lines         380      380           
  Branches       37       37           
=======================================
  Hits          351      351           
  Misses         25       25           
  Partials        4        4           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@benoit74
benoit74 merged commit b7e1ef0 into openzim:main Dec 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add integration test suite and run zimcheck on resulting test ZIM

2 participants