Skip to content

Commit

Permalink
Docs(ci): How to enable visual testing on your PR
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Mar 15, 2024
1 parent 8da6463 commit 4c8b590
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ The following is the list of supported scopes:
- `exporter-svg`
- Packages:
- `analytics`
- `codemods`
- `design-tokens`
- `form-validations`
- `icons`
Expand Down Expand Up @@ -198,10 +199,6 @@ All commands will execute Docker command that starts [Playwright][playwright] in
We run visual regression testing locally against our demo apps. Web and Web React packages are served using Vite.
Web Twig package is served using Symfony app.

In CI we use Netlify to test against.

⚠️ Currently we do not deploy the Web Twig package to any environment, so you can only test it locally.

We have two test suites and you can find them in the `./tests/e2e` directory:

- `demo-homepages` - tests the homepages of our demo apps.
Expand All @@ -212,6 +209,19 @@ We have two test suites and you can find them in the `./tests/e2e` directory:

👉 To save time and repository size, we test only in Chromium browser and only on desktop viewport.

#### On CI pipeline

In CI we use Netlify to test against.

To enable visual regression testing on CI, you need to add label `run-visual-tests` to your PR.
Then the tests will be run against the Netlify deployment on every change pushed.

When the tests fail, there will be a comment in the PR with a link to the report and a message about the failure will be raised in the Slack channel `#spirit-design-system-notifications_en`.
You can also find the report URL in the GitHub Actions run under the `Run actions/upload-artifact` section.
Look for `Artifact download URL: https://github.com/lmc-eu/spirit-design-system/actions/runs/<run-id>/artifacts/<artifact-id>`.

⚠️ Currently we do not deploy the Web Twig package to any environment, so you can only test it locally.

## Publishing

This project uses GitHub Actions to publish the packages automatically to npm. New packages are published after the new tag is pushed to the main branch. PR can be merged only by the appropriate group of maintainers.
Expand Down

0 comments on commit 4c8b590

Please sign in to comment.