Skip to content

Video Player PR

Video Player PR #28

Workflow file for this run

name: Video Player PR
on:
workflow_dispatch:
env:
CI: true
jobs:
e2e:
name: install
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Node setup
uses: ./.github/actions/node-setup
- name: NPM Install
run: npm install
- name: E2E tests
run: npm run test:e2e
- name: Upload report to artifact
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Publish report to dedicated repo
run: |
# Define the unique folder name using run ID and PR number (if available)
UNIQUE_FOLDER_NAME="report-${{ github.run_id }}-pr-${{ github.event.pull_request.number || 'no-pr' }}"
# Create a separate directory in the system's temporary directory
TMP_DIR=$(mktemp -d)
REPORT_DIR="$TMP_DIR/$UNIQUE_FOLDER_NAME"
mkdir -p $REPORT_DIR
# Clone the dedicated repo into the new directory
git clone https://github.com/cloudinary/cloudinary-video-player-reports.git $REPORT_DIR
# Copy the report files to the cloned repo
cp -r playwright-report/* $REPORT_DIR/
# Navigate to the cloned repo directory
cd $REPORT_DIR
# Commit and push the report
git add .
git commit -m "Update report for run ${{ github.run_id }} and PR ${{ github.event.pull_request.number || 'no-pr' }}"
git push origin test_branch