Skip to content

Commit b177748

Browse files
committed
chore: update project-check, add missing karma.conf file for chartjs
1 parent d56d2fd commit b177748

File tree

3 files changed

+80
-3
lines changed

3 files changed

+80
-3
lines changed

.github/workflows/project-check.yml renamed to .github/workflows/project-chartjs-check.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ jobs:
2929
- name: project check
3030
run: |
3131
npm i
32-
npm run build:lib:prod
33-
npm run lint:lib
34-
npm run test:lib:prod
3532
npm run build:chartjs:prod
3633
npm run lint:chartjs
3734
npm run test:chartjs:prod
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Project check
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
- v4-dev
9+
pull_request:
10+
branches:
11+
- master
12+
- main
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
node-version: [14.x]
21+
os: [ubuntu-latest, windows-latest, macOS-latest]
22+
23+
steps:
24+
- uses: actions/checkout@v1
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
- name: project check
30+
run: |
31+
npm i
32+
npm run build:lib:prod
33+
npm run lint:lib
34+
npm run test:lib:prod
35+
env:
36+
CI: true
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, '../../coverage/coreui-angular-chartjs'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
34+
},
35+
reporters: ['progress', 'kjhtml'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: false,
40+
singleRun: true,
41+
restartOnFileChange: false,
42+
browsers: ['ChromeHeadless'],
43+
});
44+
};

0 commit comments

Comments
 (0)