Skip to content

Commit

Permalink
vp test: adding workflow and action for CI (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayLevi authored Jul 10, 2024
1 parent ad70e46 commit 9058e88
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/actions/node-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Node Setup
description: Node Setup

outputs:
cache-hit:
description: Informing if there has been cache hit on node_modules
value: ${{ steps.node-modules.outputs.cache-hit }}

runs:
using: composite
steps:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'


- name: Synchronize Node Modules cache
id: node-modules
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
44 changes: 44 additions & 0 deletions .github/workflows/e2e_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Video Player PR

on:
workflow_dispatch:


env:
CI: true

jobs:

e2e:
name: install
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Node setup
uses: ./.github/actions/node-setup

- name: Fast Install
uses: 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: Deploy report to Github Pages
# if: always()
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: playwright-report



0 comments on commit 9058e88

Please sign in to comment.