1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-25 02:42:10 +02:00

chore: setup Github CI (#6940)

This commit is contained in:
Gary Katsevman 2020-11-10 17:45:26 -05:00 committed by GitHub
parent ade05e8e8a
commit 6a28562d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 648 additions and 387 deletions

64
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,64 @@
name: ci
on: [push, pull_request]
jobs:
ci:
env:
BROWSER_STACK_USERNAME: ${{ secrets.BROWSER_STACK_USERNAME }}
BROWSER_STACK_ACCESS_KEY: ${{ secrets.BROWSER_STACK_ACCESS_KEY }}
runs-on: ${{ matrix.os }}
strategy:
# TODO: test IE 11, Legacy Edge, and New Edge on windows-latest
# test Safari on macos-latest
matrix:
os: [ubuntu-latest]
steps:
- 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 .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
shell: bash
id: nvm
- 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 }}'
- run: npm i --prefer-offline --no-audit
# run safari on macos
- name: Run Mac test
run: npm run test -- --browsers Safari
if: ${{ startsWith(matrix.os, 'macos') }}
# only run ie 11 on windows
- name: Run Windows test
run: npm run test -- --browsers IE
if: ${{ startsWith(matrix.os, 'windows') }}
# run chrome/firefox or browserstack in linux
- name: Run linux test
uses: GabrielBB/xvfb-action@v1
with:
run: npm test
if: ${{ startsWith(matrix.os, 'ubuntu') }}

2
.nvmrc
View File

@ -1 +1 @@
lts/*
12

View File

@ -1,33 +0,0 @@
dist: bionic
language: node_js
cache: npm
before_install:
- npm install -g greenkeeper-lockfile@1
before_script:
- greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
after_failure:
- npm ls --depth=1
after_success:
- npm run assets
addons:
chrome: stable
services:
- xvfb
env:
global:
- secure: K6JpKwMkfNaJix3Bb0tLjVMzHMJgtBXdd/dvfw1BMb9DCBpd81PqXbDs7yXCddUxnUPTBPxZCrQgWsw71Wn+qEoIG5MU3uOT5A2rBbx/yZonVAGv5ed/9w0xk0OzO383CmPMFqwqtp9YmdmqGjQBkYXVXJjTvNTOAExFSdhO+3U=
- secure: GIbhjUJapvC70nIZVlhVyK+3KAD2TVKpiY/q412OO7V2izbvcM1tvU3LBoMZbROzrt5TT84tCoJDvHnrpL0OvxPwrzL5CUU7h4UTxhTOyQkEinbYAnWlW9wdrvtdczsEvANkFPqBZ53B3hVHZHMLOG8QRWaTBicF68vSHEJFqb4=
notifications:
irc:
channels:
- chat.freenode.net#videojs
use_notice: true
on_success: never
webhooks:
- http://pam.videojs.com/savage/travis
slack:
secure: LrF8K6mCYWlUt6SvdbGHazyQZSk/opKoiB/wgoGYaGc9+3wYXkVexY0WkO1m6wBKhUqXRAMVMFszr1wqKgdcxtItmFMMj8HqTLI1MVqgKqYX4Ux3CnEHJQiwxIk0aVL7lHLsZTXV/2Y0QIOYmAnCrgy46klETrk0ZuXf5okpu2Q=

921
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -111,8 +111,9 @@
"gh-release": "^3.5.0",
"humanize-duration": "^3.18.0",
"husky": "^1.2.0",
"is-ci": "^2.0.0",
"jsdoc": "^3.6.2",
"karma": "^4.1.0",
"karma": "^5.2.3",
"lint-staged": "^8.2.0",
"markdown-table": "^1.1.3",
"maxmin": "^2.1.0",
@ -147,7 +148,7 @@
"uglify-js": "^3.6.0",
"unified": "^7.0.2",
"videojs-flash": "^2.2.0",
"videojs-generate-karma-config": "~5.2.1",
"videojs-generate-karma-config": "^7.0.0",
"videojs-languages": "^2.0.0",
"videojs-standard": "^8.0.3",
"webpack": "^1.15.0"
@ -163,11 +164,6 @@
"core.es.js"
]
},
"greenkeeper": {
"ignore": [
"webpack"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"

View File

@ -11,6 +11,7 @@ import _ from 'lodash';
import pkg from './package.json';
import multiEntry from 'rollup-plugin-multi-entry';
import stub from 'rollup-plugin-stub';
import isCI from 'is-ci';
const compiledLicense = _.template(fs.readFileSync('./build/license-header.txt', 'utf8'));
const bannerData = _.pick(pkg, ['version', 'copyright']);
@ -57,7 +58,7 @@ const primedBabel = babel({
});
const progress = () => {
if (process.env.TRAVIS || process.env.NETLIFY) {
if (isCI) {
return {};
}

View File

@ -57,7 +57,7 @@ module.exports = function(config) {
*/
/* eslint-disable no-console */
console.log(JSON.stringify(config, null, 2));
// console.log(JSON.stringify(config, null, 2));
/* eslint-enable no-console */
};