Skip to content

Commit e4ffd7c

Browse files
authored
Implement artifact upload for failed SDK UI tests
Add artifact upload step for UI tests on failure
1 parent c95a6ab commit e4ffd7c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,3 +410,13 @@ jobs:
410410
npm install
411411
xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" \
412412
npm run cy:run:sdk
413+
414+
- name: Upload UI tests artifacts
415+
if: ${{ failure() }}
416+
shell: bash
417+
working-directory: /opt/countly/ui-tests/cypress
418+
run: |
419+
ARTIFACT_ARCHIVE_NAME="$(date '+%Y%m%d-%H.%M')_${GITHUB_REPOSITORY#*/}_CI#${{ github.run_number }}_ui_test_sdk.tar.gz"
420+
mkdir -p screenshots videos
421+
tar zcvf "$ARTIFACT_ARCHIVE_NAME" screenshots videos
422+
curl -o /tmp/uploader.log -u "${{ secrets.BOX_UPLOAD_AUTH }}" ${{ secrets.BOX_UPLOAD_PATH }} -T "$ARTIFACT_ARCHIVE_NAME"

0 commit comments

Comments
 (0)