Skip to content

Commit 7b9e1c1

Browse files
Merge branch 'azure-pipelines'
2 parents 0d9dcaf + e5864c8 commit 7b9e1c1

File tree

7 files changed

+201
-3
lines changed

7 files changed

+201
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ testem.log
4242
# System Files
4343
.DS_Store
4444
Thumbs.db
45+
46+
TESTS-*.xml

.vs/ProjectSettings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"CurrentProjectSetting": null
3+
}

.vs/slnx.sqlite

88 KB
Binary file not shown.

azure-pipelines.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Node.js with Angular
2+
# Build a Node.js project that uses Angular.
3+
# Add steps that analyze code, save build artifacts, deploy, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
5+
6+
trigger:
7+
- master
8+
9+
pool:
10+
vmImage: 'ubuntu-latest'
11+
12+
steps:
13+
- task: NodeTool@0
14+
inputs:
15+
versionSpec: '10.x'
16+
displayName: 'Install Node.js'
17+
18+
- script: npm install
19+
displayName: 'Install Packages'
20+
21+
- script: npm run build:lib
22+
displayName: 'Build Library'
23+
24+
- script: npm run build:app
25+
displayName: 'Build App'
26+
27+
- script: npx ng test --watch=false
28+
displayName: 'Execute Tests'
29+
30+
- task: PublishTestResults@2
31+
condition: succeededOrFailed()
32+
inputs:
33+
testResultsFormat: 'JUnit'
34+
testResultsFiles: '**/TESTS-*.xml'
35+
displayName: 'Publish Test Results'
36+
37+
- task: PublishCodeCoverageResults@1
38+
condition: succeededOrFailed()
39+
inputs:
40+
codeCoverageTool: 'Cobertura'
41+
summaryFileLocation: '$(Build.SourcesDirectory)/coverage/cobertura-coverage.xml'
42+
displayName: 'Publish Code Coverage Results'

karma.conf.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Karma configuration file, see link for more information
22
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

4+
const process = require('process');
5+
process.env.CHROME_BIN = require('puppeteer').executablePath();
6+
47
module.exports = function (config) {
58
config.set({
69
basePath: '',
@@ -10,24 +13,26 @@ module.exports = function (config) {
1013
require('karma-chrome-launcher'),
1114
require('karma-jasmine-html-reporter'),
1215
require('karma-coverage-istanbul-reporter'),
16+
require('karma-junit-reporter'),
1317
require('@angular-devkit/build-angular/plugins/karma')
1418
],
1519
client:{
1620
clearContext: false // leave Jasmine Spec Runner output visible in browser
1721
},
1822
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
23+
dir: require('path').join(__dirname, 'coverage'),
24+
reports: [ 'html', 'lcovonly', 'cobertura' ],
2025
fixWebpackSourcePaths: true
2126
},
2227
angularCli: {
2328
environment: 'dev'
2429
},
25-
reporters: ['progress', 'kjhtml'],
30+
reporters: ['progress', 'kjhtml', 'junit'],
2631
port: 9876,
2732
colors: true,
2833
logLevel: config.LOG_INFO,
2934
autoWatch: true,
30-
browsers: ['Chrome'],
35+
browsers: ['ChromeHeadless'],
3136
singleRun: false
3237
});
3338
};

package-lock.json

Lines changed: 144 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@
4444
"karma-coverage-istanbul-reporter": "2.0.5",
4545
"karma-jasmine": "2.0.1",
4646
"karma-jasmine-html-reporter": "1.4.2",
47+
"karma-junit-reporter": "^2.0.1",
4748
"ng-packagr": "^9.0.0",
4849
"protractor": "5.4.2",
50+
"puppeteer": "^2.0.0",
4951
"ts-node": "8.2.0",
5052
"tslint": "5.17.0",
5153
"typescript": "^3.7.5"

0 commit comments

Comments
 (0)