diff --git a/.github/workflows/e2e_pr.yml b/.github/workflows/e2e_pr.yml index 3ec9eb94..0ad95782 100644 --- a/.github/workflows/e2e_pr.yml +++ b/.github/workflows/e2e_pr.yml @@ -2,6 +2,7 @@ name: Video Player PR on: workflow_dispatch: + pull_request: env: CI: true @@ -16,8 +17,11 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Node setup - uses: ./.github/actions/node-setup + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' - name: NPM Install run: npm install @@ -33,12 +37,17 @@ jobs: path: playwright-report/ retention-days: 30 -# - name: Deploy report to Github Pages -# if: always() -# uses: peaceiris/actions-gh-pages@v3 -# with: -# github_token: ${{ secrets.GITHUB_TOKEN }} -# publish_dir: playwright-report - - - + - name: Pushes to reports repository + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.BOT_TOKEN }} + with: + source-directory: 'playwright-report' + destination-github-username: 'cloudinary' + destination-repository-name: 'cloudinary-video-player-reports' + user-email: '' + target-branch: main + target-directory: 'playwright-report_${{ github.run_id }}' + + - name: Write URL in summary + run: echo "### Test results https://cloudinary.github.io/cloudinary-video-player-reports/playwright-report_${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 0528e825..5eb1b446 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -24,7 +24,4 @@ jobs: run: npm run build-all - name: Unit tests - run: npm run test:unit - - - name: E2E tests - run: npm run test:e2e + run: npm run test:unit \ No newline at end of file