How to Migrate Test Reporting to GitHub Actions
GitLab and Jenkins parse a JUnit XML path to show test results; Actions has no native parser, so you upload the XML and use a reporter action or the job summary.
Elsewhere you point the CI at a JUnit XML file and it renders results. Actions does not parse JUnit by default, so upload the report as an artifact and add a community test-reporter action, or write to the job summary.
Concept mapping
| Source | GitHub Actions |
|---|---|
GitLab artifacts.reports.junit | upload XML + reporter action |
Jenkins junit '**/*.xml' | upload XML + reporter action |
| inline results tab | Checks tab / job summary |
| flaky-test detail | reporter action output |
After
.github/workflows/ci.yml
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm test -- --reporters=jest-junit
- uses: actions/upload-artifact@v4
if: always()
with:
name: junit
path: junit.xml
- uses: dorny/test-reporter@v1
if: always()
with:
name: Jest tests
path: junit.xml
reporter: jest-junitWhat does not map cleanly
- There is no built-in JUnit view; you rely on a third-party action or a job-summary write.
- Use
if: always()so the report uploads even when tests fail. - A reporter action that publishes checks needs
checks: writepermission.
Related guides
How to Migrate From GitLab CI to GitHub ActionsConvert a .gitlab-ci.yml to GitHub Actions, mapping stages to jobs with needs, script to run, artifacts to up…
How to Migrate a Manual Approval Gate to GitHub ActionsReplace a manual approval step from GitLab, Jenkins, or Azure with a GitHub Actions protected environment tha…