From bf97c5b2dbfa70c6a5139e928651addb46fa3083 Mon Sep 17 00:00:00 2001 From: Brandon Casey <2381475+brandonocasey@users.noreply.github.com> Date: Tue, 15 Jun 2021 12:52:24 -0400 Subject: [PATCH] chore: update dependencies, readme, examples, and switch to github actions ci (#242) --- .github/workflows/ci.yml | 77 + .nvmrc | 2 +- .travis.yml | 19 - README.md | 2 +- examples/360-sphere-detail.html | 34 + index.html | 1 + package-lock.json | 8676 +++++++++++++------------------ package.json | 38 +- test/plugin.test.js | 16 +- 9 files changed, 3818 insertions(+), 5047 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml create mode 100644 examples/360-sphere-detail.html diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..2489954d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,77 @@ +name: ci + +on: [push, pull_request] + +jobs: + should-skip: + continue-on-error: true + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should-skip-job: ${{steps.skip-check.outputs.should_skip}} + steps: + - id: skip-check + uses: fkirc/skip-duplicate-actions@v2.1.0 + with: + github_token: ${{github.token}} + + ci: + needs: should-skip + if: ${{needs.should-skip.outputs.should-skip-job != 'true' || github.ref == 'refs/heads/main'}} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + env: + BROWSER_STACK_USERNAME: ${{secrets.BROWSER_STACK_USERNAME}} + BROWSER_STACK_ACCESS_KEY: ${{secrets.BROWSER_STACK_ACCESS_KEY}} + runs-on: ${{matrix.os}} + steps: + - name: checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ~/.npm + **/node_modules + key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}} + restore-keys: | + ${{runner.os}}-npm- + ${{runner.os}}- + + - name: read node version from .nvmrc + run: echo ::set-output name=NVMRC::$(cat .nvmrc) + shell: bash + id: nvm + + - name: update apt cache on linux w/o browserstack + run: sudo apt-get update + if: ${{startsWith(matrix.os, 'ubuntu') && !env.BROWSER_STACK_USERNAME}} + + - name: install ffmpeg/pulseaudio for firefox on linux w/o browserstack + run: sudo apt-get install ffmpeg pulseaudio + if: ${{startsWith(matrix.os, 'ubuntu') && !env.BROWSER_STACK_USERNAME}} + + - name: start pulseaudio for firefox on linux w/o browserstack + run: pulseaudio -D + if: ${{startsWith(matrix.os, 'ubuntu') && !env.BROWSER_STACK_USERNAME}} + + - name: setup node + uses: actions/setup-node@v1 + with: + node-version: '${{steps.nvm.outputs.NVMRC}}' + + # turn off the default setup-node problem watchers... + - run: echo "::remove-matcher owner=eslint-compact::" + - run: echo "::remove-matcher owner=eslint-stylish::" + - run: echo "::remove-matcher owner=tsc::" + + - name: npm install + run: npm i --prefer-offline --no-audit + + - name: run npm test + uses: GabrielBB/xvfb-action@v1 + with: + run: npm run test diff --git a/.nvmrc b/.nvmrc index b009dfb9..8351c193 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/* +14 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d39804c9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js -# node version is specified using the .nvmrc file -cache: npm -before_install: - - npm install -g greenkeeper-lockfile@1 -before_script: - - greenkeeper-lockfile-update -after_script: - - greenkeeper-lockfile-upload -addons: - firefox: latest - chrome: stable - apt: - update: true - # libav-tools is needed by firefox for h.264 support on linux - packages: - libav-tools -services: - - xvfb diff --git a/README.md b/README.md index 9b527cc6..797d8e37 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Maintenance Status: Stable ## Installation ```sh -npm install --save videojs-vr +npm i videojs-vr ``` ## Browser Support diff --git a/examples/360-sphere-detail.html b/examples/360-sphere-detail.html new file mode 100644 index 00000000..aeeeec8c --- /dev/null +++ b/examples/360-sphere-detail.html @@ -0,0 +1,34 @@ + + +
+ +