jsunit: Run jsunit with chromium/puppeteer on github actions

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-12-29 08:18:29 +01:00
parent 14306222df
commit c7a320d880
5 changed files with 1065 additions and 2249 deletions

View File

@ -1,27 +1,4 @@
kind: pipeline
name: jsunit
steps:
- name: jsunit
image: nextcloudci/jsunit:jsunit-5
environment:
CODECOV_TOKEN:
from_secret: CODECOV_TOKEN
commands:
- ./autotest-js.sh
- curl -o codecov.sh https://codecov.io/bash
- bash codecov.sh -C $DRONE_COMMIT
trigger:
branch:
- master
- stable*
event:
- pull_request
- push
---
kind: pipeline
name: checkers
steps:

View File

@ -49,6 +49,17 @@ jobs:
- name: Test
run: npm run test
jsunit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Test
run: ./autotest-js.sh
handlebars:
runs-on: ubuntu-latest
strategy:

3246
build/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,21 +9,20 @@
"private": true,
"homepage": "https://github.com/nextcloud/",
"contributors": [],
"dependencies": {},
"devDependencies": {
"handlebars": "^4.7.6",
"jasmine-core": "~2.5.2",
"jasmine-sinon": "^0.4.0",
"jsdoc": "^3.6.6",
"karma": "^3.1.4",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "2.0.1",
"karma-jasmine": "^1.1.2",
"karma-jasmine-sinon": "^1.0.4",
"karma-junit-reporter": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-spec-reporter": "^0.0.32",
"karma-viewport": "^1.0.7",
"node-sass": "~4.14.1",
"phantomjs-prebuilt": "*",
"puppeteer": "^5.5.0",
"sinon": "<= 5.0.7"
},
"engine": "node >= 6.9"

View File

@ -33,6 +33,10 @@
* preprocessor, which is needed to be able to debug tests properly in a browser.
*/
if (!process.env.CHROMIUM_BIN) {
process.env.CHROMIUM_BIN = require('puppeteer').executablePath()
}
/* jshint node: true */
module.exports = function(config) {
function findApps() {
@ -242,7 +246,16 @@ module.exports = function(config) {
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['dots', 'junit', 'coverage'],
reporters: ['spec'],
specReporter: {
maxLogLines: 5,
suppressErrorSummary: false,
suppressFailed: false,
suppressPassed: true,
suppressSkipped: true,
showSpecTiming: false,
},
junitReporter: {
outputFile: 'tests/autotest-results-js.xml'
@ -281,16 +294,8 @@ module.exports = function(config) {
// - PhantomJS
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
// use PhantomJS_debug for extra local debug
browsers: ['PhantomJS'],
browsers: ['ChromiumHeadless'],
plugins: [
'karma-phantomjs-launcher',
'karma-coverage',
'karma-jasmine',
'karma-jasmine-sinon',
'karma-viewport',
'karma-junit-reporter'
],
// you can define custom flags
customLaunchers: {
PhantomJS_debug: {