Skip to content

Commit

Permalink
Merge pull request #26 from swisscom/feature/playwright-checks
Browse files Browse the repository at this point in the history
Feature/playwright checks
  • Loading branch information
SgiobairOg authored Nov 19, 2024
2 parents 50d94f0 + 9d94a46 commit 12f6ea9
Show file tree
Hide file tree
Showing 21 changed files with 2,713 additions and 6,398 deletions.
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
./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

0 comments on commit 12f6ea9

Please sign in to comment.