Skip to content

Commit

Permalink
chore: update master (#681)
Browse files Browse the repository at this point in the history
fix: use videojs events & re-trigger to analytics package with custom… (#639)
fix: remove IE polyfill (#665)
fix: custom profile docs example (#673)
fix: chapters innerHTML to innerText (#671)
  • Loading branch information
github-actions[bot] authored Jul 15, 2024
1 parent 9d65e18 commit d9b6251
Show file tree
Hide file tree
Showing 21 changed files with 2,123 additions and 59 deletions.
54 changes: 30 additions & 24 deletions .github/actions/fetch-latest-release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,42 @@ async function fetchLatestRelease() {
let latestRelease;

try {
latestRelease = await octokit.rest.repos.getLatestRelease({
owner,
repo
const releases = await octokit.rest.repos.listReleases({
owner: owner,
repo: repo
});

const nonDraftReleases = releases.data.filter(release => !release.draft);

const sortedReleases = nonDraftReleases.sort((a, b) => new Date(b.created_at) - new Date(a.created_at));

latestRelease = sortedReleases[0];
} catch (error) {
core.info('Could not fetch the latest release. Have you made one yet?');
core.setFailed(error);
}

const { data } = latestRelease;

core.setOutput('url', data.url);
core.setOutput('assets_url', data.assets_url);
core.setOutput('upload_url', data.upload_url);
core.setOutput('html_url', data.html_url);
core.setOutput('id', data.id.toString());
core.setOutput('node_id', data.node_id);
core.setOutput('tag_name', data.tag_name);
core.setOutput('target_commitish', data.target_commitish);
core.setOutput('name', data.name);
core.setOutput('body', data.body);
core.setOutput('draft', data.draft);
core.setOutput('prerelease', data.prerelease);
core.setOutput('author_id', data.author.id.toString());
core.setOutput('author_node_id', data.author.node_id);
core.setOutput('author_url', data.author.url);
core.setOutput('author_login', data.author.login);
core.setOutput('author_html_url', data.author.html_url);
core.setOutput('author_type', data.author.type);
core.setOutput('author_site_admin', data.author.site_admin);
core.info(`Found most recent release: \`${latestRelease.tag_name}\``);

core.setOutput('url', latestRelease.url);
core.setOutput('assets_url', latestRelease.assets_url);
core.setOutput('upload_url', latestRelease.upload_url);
core.setOutput('html_url', latestRelease.html_url);
core.setOutput('id', latestRelease.id.toString());
core.setOutput('node_id', latestRelease.node_id);
core.setOutput('tag_name', latestRelease.tag_name);
core.setOutput('target_commitish', latestRelease.target_commitish);
core.setOutput('name', latestRelease.name);
core.setOutput('body', latestRelease.body);
core.setOutput('draft', latestRelease.draft);
core.setOutput('prerelease', latestRelease.prerelease);
core.setOutput('author_id', latestRelease.author.id.toString());
core.setOutput('author_node_id', latestRelease.author.node_id);
core.setOutput('author_url', latestRelease.author.url);
core.setOutput('author_login', latestRelease.author.login);
core.setOutput('author_html_url', latestRelease.author.html_url);
core.setOutput('author_type', latestRelease.author.type);
core.setOutput('author_site_admin', latestRelease.author.site_admin);
}

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



1 change: 1 addition & 0 deletions .github/workflows/release-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
release-as: ${{ steps.calculate-edge-version.outputs.next-edge }}
prerelease: true
default-branch: ${{ github.ref_name }}
changelog-path: CHANGELOG-edge.md

# The logic below handles the npm publication:
- uses: actions/setup-node@v4
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/update_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,20 @@ jobs:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0

- name: Merge edge into master
- name: Reset promotion branch
run: |
git config user.name "cloudinary-jenkins"
git config user.email "[email protected]"
git checkout -b update-master
git merge -X ours --no-edit origin/edge || true
git fetch origin edge:edge
git reset --hard edge
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.BOT_TOKEN }}
branch: update-master
base: master
branch: update-master-from-edge
title: "chore: update master"
body: |
This PR was created Automatically.
Please approve and squash-merge it.
IMPORTANT:
Before merging, make sure all the changes are listed in the squash-commit footer.
Format must be plain conventional-commit, one per line.
No `*` bullets and no `----` comments are allowed.
Commit footer format for release-please (see https://github.com/googleapis/release-please/tree/main?tab=readme-ov-file#what-if-my-pr-contains-multiple-fixes-or-features):
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:
- name: Unit tests
run: npm run test:unit

# - name: E2E tests
# run: npm run test
- name: E2E tests
run: npm run test:e2e
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ lib/
.DS_Store

\.history/

# playwright e2e tests

/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
Loading

0 comments on commit d9b6251

Please sign in to comment.