Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/playwright checks #26

Merged
merged 13 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ on:

jobs:
check:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
checks: write

steps:
- uses: actions/checkout@v4
Expand All @@ -22,5 +23,20 @@ jobs:
distribution: 'zulu'
- uses: gradle/actions/setup-gradle@v4

- name: Download Icons
run: (cd mock && curl -Lo AdobeSpectrumIcons18.woff2 "https://developer.adobe.com/experience-manager/reference-materials/6-5/coral-ui/coralui3/resources/coralui-component-icon/AdobeSpectrumIcons18.woff2?651453a29a2cf87546cdc6215616731e" && curl -Lo AdobeSpectrumIcons24.woff2 "https://developer.adobe.com/experience-manager/reference-materials/6-5/coral-ui/coralui3/resources/coralui-component-icon/AdobeSpectrumIcons24.woff2?b750bfd862e4ef0daea700228de3e788")

- name: Run checks
run: ./gradlew check --continue
run: ./gradlew playwrightInstall check --continue

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: reports
path: build/reports/
retention-days: 30

- uses: mikepenz/action-junit-report@v5
if: ${{ !cancelled() }}
with:
report_paths: '**/build/**/TEST-*.xml'
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,20 @@ The following checks must succeed before code can be merged:
- Prettier
- TypeScript compile
- ESLint
- Playwright

The `./gradlew check` command executes them all. To reformat code, use `./gradlew prettierFormat`.

The playwright tests also include visual regression tests. The reference images only exist for chromium on linux. All other variations have been deemed too flaky. If you are not on linux (or WSL), you can use docker to run the tests (check the current version of playwright in `package.json` and adjust `PLAYWRIGHT_VERSION` accordingly):

```bash
PLAYWRIGHT_VERSION=v1.49.0
SgiobairOg marked this conversation as resolved.
Show resolved Hide resolved
./gradlew frontendBuild
docker run -v .:/app --workdir /app -it --rm mcr.microsoft.com/playwright:$PLAYWRIGHT_VERSION-noble npm run test:playwright
```

Exclude the playwright task from `./gradlew check` by passing `-x playwright`.

### Working on the GUI editor

To run the editor GUI independently from AEM (and with mocked responses), the watch mode can be used:
Expand Down
3 changes: 0 additions & 3 deletions bnd.bnd

This file was deleted.

Loading
Loading