Skip to content

GitHub Action ​

Run your Playwright tests as usual, then add the fitlocale step with if: always(), so it runs when tests fail too:

yaml
- run: npx playwright test
- uses: melliforge/fitlocale@v0
  if: always()

It writes a table of new issues to the job summary and uploads the report directory as an artifact. It never fails the job: your test step already did, if there were new issues.

On GitLab CI or another CI system, run the tests and save the report directory yourself: see GitLab CI and other CI systems.

InputDefaultMeaning
report-dirfitlocale-reportThe reporter's outputDir
artifact-namefitlocale-reportName of the uploaded report. In a matrix or with shards, give each job its own name
max-rows50Most issues listed in the job summary
fitlocale-commandyour node_modules/.bin/fitlocale, else npx fitlocale at the Action's major version (fitlocale@0 for @v0)Command that runs the fitlocale CLI
uploadfalseSend the report to fitlocale cloud (see below)
upload-urlhttps://cloud.fitlocale.devfitlocale cloud address

upload ​

With a fitlocale cloud plan, upload: true sends the report to fitlocale cloud. It posts one comment on the pull request, showing the new issues with a crop of each, and links to the hosted report. The job signs in with its GitHub OIDC token, so it needs the id-token: write permission and no secret:

yaml
permissions: { contents: read, id-token: write }
# after the tests:
- uses: melliforge/fitlocale@v0
  if: always()
  with: { upload: true }

Screenshots, crops and results.json are uploaded. The mask option paints over customer data in the images, and ignore keeps an element's text out of results.json. Pull requests from forks are not uploaded. Like the rest of the Action, the upload never fails the job: a missing plan or permission, or a service that doesn't answer, is one line in the log. See fitlocale upload.

Released under the MIT License.