The Projektor GitHub Action publishes your test results to the Projektor server from a GitHub Actions workflow. It’s built on the Node script, so it supports the same test result, coverage, attachment, and performance formats, but you don’t need to add any dependencies to your project. That makes it a good fit for projects in any language, as long as the tests write JUnit XML results.
The latest version of the action is v16.0.0, which runs on the Node 24 Actions runtime and includes
Node script 3.13.15. Check the releases for newer versions.
Add a step after your tests run that publishes the results:
- name: Run tests
run: npm test
- name: Publish results to Projektor
if: always()
uses: craigatk/projektor-action@v16.0.0
with:
server-url: https://projektor.example.com
results: test-results/*.xml
coverage: coverage/clover.xml
if: always() makes the step run even when the tests fail - which is when you most want to see the
results.
To publish multiple file patterns, put each one on its own line:
with:
server-url: https://projektor.example.com
results: |
ui/test-results/*.xml
ui/cypress/results/*.xml
attachments: |
ui/cypress/screenshots/**/*.png
ui/cypress/videos/*.mp4
The action also reads a Node script config file, projektor.json in the root of
your repository by default. Use a config file for options the action doesn’t have its own input for,
such as codeQuality, exitWithFailure, or gitMainBranchNames:
- uses: craigatk/projektor-action@v16.0.0
with:
config-file: projektor.json
When the config file exists, the action takes its settings from the config file and ignores the other
inputs such as server-url and results (except token). So use either a config file or the individual
inputs, not both - and if you use the inputs, make sure there’s no projektor.json in the root of your repository.
If your Projektor server requires a publish token, store the token as a
GitHub Actions secret and pass it with the token input:
- uses: craigatk/projektor-action@v16.0.0
with:
server-url: https://projektor.example.com
results: test-results/*.xml
token: ${{ secrets.PROJEKTOR_TOKEN }}
The action sets the report-url output to the Projektor report’s URL, so later steps can use it -
for example to include the link in a notification:
- name: Publish results to Projektor
id: projektor
if: always()
uses: craigatk/projektor-action@v16.0.0
with:
server-url: https://projektor.example.com
results: test-results/*.xml
- name: Show report link
if: always()
run: echo "Projektor report - ${{ steps.projektor.outputs.report-url }}"
| Input | Default | Description |
|---|---|---|
server-url |
Projektor server URL to publish results to. Required unless set in the config file. | |
results |
Paths to the test results XML files, one per line | |
coverage |
Paths to code coverage files, one per line | |
attachments |
Paths to files to attach to the test report, such as screenshots, one per line | |
performance |
Paths to performance test results files, one per line | |
project-name |
Project name, when publishing multiple Projektor reports from the same repo | |
token |
Token for publishing to a Projektor server that has a publish token set | |
compression-enabled |
true |
Whether to compress the results when sending them to the server |
config-file |
projektor.json |
Path to a Node script config file |
print-link |
Set to "true" to set the report-url output from a report already published earlier in the job, instead of publishing again |
| Output | Description |
|---|---|
report-url |
Link to the Projektor test report |
When running in GitHub Actions, the action automatically sends the repository, branch, and commit SHA with your results. That’s what powers Projektor features like flaky test detection, coverage trends, pull request comments, and Slack notifications - no extra configuration needed.
3.13.15 (previously 3.12.2) and other dependency updates