-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding docker setup for scene-composer ui tests
- Moves all snapshots to use git lfs (replaces with pointers, you will need git lfs to checkout from this point on) - Updates snapshots for scene-composer ui tests, now just chromium-linux for now (you can technically run darwin if you like, but our master snapshots are linux based from now on). - Add new Github workflow anyone can add to a pull request to trigger a reliability check. Adding the "test:reliability" label to a pull request will now force all UI tests to run 5 times, useful for checking for flaky tests when new tests are being added in a PR
- Loading branch information
1 parent
1349011
commit 3db0c9b
Showing
17 changed files
with
132 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main, rc ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "UI Test Reliability Check" | ||
|
||
# We only run this on PRs that have the label "test:reliability", otherwise it's excluded. | ||
# Add this label anytime there are new UI tests added, or you want to verify a change still | ||
# reliabily passes tests | ||
on: | ||
pull_request: | ||
types: [ labeled ] | ||
|
||
env: | ||
PW_TEST_HTML_REPORT_OPEN: 'never' | ||
|
||
jobs: | ||
test-reliability: | ||
if: ${{ github.event.label.name == 'test:reliability' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
lfs: 'true' | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
cache: 'npm' | ||
cache-dependency-path: '**/package-lock.json' | ||
|
||
- name: Cache playwright binaries | ||
uses: actions/cache@v4 | ||
id: playwright-cache | ||
with: | ||
path: | | ||
~/.cache/ms-playwright | ||
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} | ||
- name: Install | ||
run: | ||
npm ci --prefer-offline --no-audit --no-fund && npm run bootstrap | ||
|
||
- name: Install Playwright's dependencies | ||
run: npx playwright install --with-deps | ||
|
||
- name: test reliability | ||
run: | ||
npm run test:reliability --production | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: Playwright failed test-results | ||
path: packages/**/test-results | ||
retention-days: 30 | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: packages/**/playwright-report | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'body-max-line-length': [2, 'always', 250], | ||
'body-max-line-length': [0], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3.0' | ||
|
||
services: | ||
playwright: | ||
image: mcr.microsoft.com/playwright:v1.39.0-focal | ||
build: . | ||
volumes: | ||
- ../../:/iot-app-kit | ||
ports: | ||
- 9323:9323/tcp | ||
- 7006:7006/tcp | ||
working_dir: '/iot-app-kit/packages/scene-composer' | ||
command: sh -c "npx playwright install chromium" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
...-composer--local-scene.spec.ts-snapshots/local-scene-canvas-chromium-darwin.png
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...e-composer--local-scene.spec.ts-snapshots/local-scene-canvas-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions
3
...-motion-indicator.spec.ts-snapshots/motion-indicator-canvas-chromium-darwin.png
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...--motion-indicator.spec.ts-snapshots/motion-indicator-canvas-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters