Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@ jobs:
- name: Run browser tests in Saucelabs
run: npm run test-ci
timeout-minutes: 5
- name: Install lcov
run: |
sudo apt update
sudo apt install lcov
- name: Merge lcov reports
run: find coverage -name lcov.info -exec echo -a \"{}\" \; | xargs lcov -o coverage/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
14 changes: 12 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,28 @@ module.exports = function (config) {
'stackframe.js',
'spec/*-spec.js'
],
reporters: ['spec'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
customLaunchers: {
Chrome_Travis: {
Chrome_No_Sandbox: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
browsers: ['PhantomJS'],
reporters: ['spec', 'saucelabs', 'coverage', 'coveralls'],
preprocessors: {
'error-stack-parser.js': 'coverage'
},
coverageReporter: {
type: 'lcov',
dir: 'coverage',
subdir: function(browser) {
return browser.toLowerCase().split(/[ /-]/)[0];
}
},
singleRun: false
});
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"scripts": {
"lint": "eslint",
"test": "karma start karma.conf.js --single-run",
"test-pr": "karma start karma.conf.js --single-run --browsers Firefox,Chrome_Travis",
"test-pr": "karma start karma.conf.js --single-run --browsers Firefox,Chrome_No_Sandbox",
"test-ci": "karma start karma.conf.ci.js --single-run",
"prepare": "cp stackframe.js dist/ && uglifyjs stackframe.js -o dist/stackframe.min.js --compress --mangle --source-map \"url=stackframe.min.js.map\""
}
Expand Down