* Upload test-artifacts directory

* Rename test artifacts directory to avoid conflicts

* Update .gitignore

* Upload test artifacts

* Update .gitignore

* Update move-artifacts.sh

* Update artifacts.ts

* Update pipeline-segment-electron-test.yml

* Make output less noisy

* reduce artifact image size
This commit is contained in:
Sam Maddock 2024-07-17 01:56:56 -04:00 коммит произвёл GitHub
Родитель 778d3098a0
Коммит c7709747d0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -187,10 +187,17 @@ jobs:
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
fi
fi
- name: Upload Test Artifacts
if: always() && !cancelled()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: test_artifacts_${{ env.ARTIFACT_KEY }}
path: src/electron/spec/artifacts
if-no-files-found: ignore
- name: Wait for active SSH sessions
if: always() && !cancelled()
run: |
while [ -f /var/.ssh-lock ]
do
sleep 60
done
done

3
spec/.gitignore поставляемый
Просмотреть файл

@ -1 +1,2 @@
node_modules
node_modules
artifacts

Просмотреть файл

@ -167,11 +167,18 @@ export class ScreenCapture {
} while (Date.now() < expiration);
if (!gotExpectedResult) {
// Limit image to 720p to save on storage space
if (process.env.CI) {
const width = Math.floor(Math.min(frame.getSize().width, 720));
frame = frame.resize({ width });
}
// Save the image as an artifact for better debugging
const artifactName = await createArtifactWithRandomId(
(id) => `color-mismatch-${id}.png`,
frame.toPNG()
);
throw new AssertionError(
`Expected color at (${point.x}, ${point.y}) to ${
matchIsExpected ? 'match' : '*not* match'