Skip to content

Commit

Permalink
chore: upload canary test results (#2169)
Browse files Browse the repository at this point in the history
Co-authored-by: tomiir <rocchitomas@gmail.com>
  • Loading branch information
chris13524 and tomiir authored Apr 23, 2024
1 parent cfd4f4f commit 88984dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile.canary
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:20-bookworm
RUN apt update && apt install -y awscli

WORKDIR /src

Expand All @@ -12,4 +13,4 @@ RUN npm run playwright:install

ENV TIMING_LOGS=true

CMD ["npm", "run", "playwright:test:canary"]
CMD ["./docker-canary.sh"]
9 changes: 9 additions & 0 deletions apps/laboratory/docker-canary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/env/bin

# Not adding `set -e` so that S3 upload happens regardless

npm run playwright:canary:test

destination="s3://$TEST_RESULTS_BUCKET/web3modal-canary/$(date --iso-8601=seconds)/test-results/"
echo "Uploading test results to $destination"
aws s3 cp ./test-results/ $destination --recursive
4 changes: 2 additions & 2 deletions apps/laboratory/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export default defineConfig<ModalFixture>({
/* Take a screenshot when the test fails */
screenshot: 'only-on-failure',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
/* Collect trace regardless so we can debug latency regressions. See https://playwright.dev/docs/trace-viewer */
trace: 'on',

video: 'retain-on-failure'
},
Expand Down

0 comments on commit 88984dc

Please sign in to comment.