Skip to content
This repository has been archived by the owner on Sep 4, 2022. It is now read-only.

Commit

Permalink
Changed initial configs, added job config
Browse files Browse the repository at this point in the history
  • Loading branch information
andriimykytyn committed Apr 12, 2020
1 parent 4bcdb54 commit 785db22
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .travis.yml
@@ -0,0 +1,30 @@
language: node_js
node_js:
- '12'
dist: trusty
branches:
only:
- master
cache:
directories:
- node_modules
addons:
chrome: stable
sonarcloud:
organization: speech4j
before_script:
- npm install
script:
- npm run test-headless
- sonar-scanner -Dsonar.verbose=true -X
- npm run build
deploy:
provider: heroku
skip_cleanup: true
keep-history: true
app: speech4jweb
api_key:
secure: fZLBDGUUwJS6setqj4DDwHCwfr7ybdkSTu7rhEGXLawOFYpUvLkOP/McYBITMh9bOFe59HLsF5mfKb3v7B+xP8qjsTWzdVOB7jWztoEznZgXupcGhAX2DFO0y1SBYOvsg+Tq7623rIYQoqcX6bsATD0drlv1qhS4tjblxLzTZm8L0c4SA1w5JeSzSHL8yS83O9iXeJQKBsqaOA7qNEqmDpU4YGGenAK0FBGWNFnW5uvFFJKg9B/c8F73mXw/u2pMeYU2w8Gop5SIn9I211WA23El5I4LR7rYEvd/8tuW50InpDlL2BVS32hjrZa+xQPIIKFgtR3YssLc23kc/98K0Z9QM52LPlzoZTpGBtDgSK3hYU9ZtVRSRqL2V8m5tYnZehOSkwOfvveirQk1r/DRxk7c7F5KkIQ6GpYqbUbSJT+oCn/UsIirqI1GxFF18H88AsXr2BCgejpPDHKDu291AItLGls6SJQKQsRZCCp2JgIHUqZL60XWNo0kYteNtQyeynq8UhoCBueZFxh+sbT/56EMPXBO/7/U8nvoZ/xRO+VYgmGArpz3opjAusIa6YlXns0PgaCilJHnX64VE2ykioiYBtAfOTWG0bsTViiqcH40M3h1kjRpzQDyPCcN+btNx6qHTUyhmANQHLVpinLaIrJtCBCHZ7KNJsborIlNgUo=

after_deploy:
- echo "Application Deployed!"
3 changes: 3 additions & 0 deletions e2e/protractor.conf.js
Expand Up @@ -13,6 +13,9 @@ exports.config = {
'./src/**/*.e2e-spec.ts'
],
capabilities: {
chromeOptions: {
args: [ "--headless" ]
},
browserName: 'chrome'
},
directConnect: true,
Expand Down
8 changes: 7 additions & 1 deletion karma.conf.js
Expand Up @@ -25,7 +25,13 @@ module.exports = function (config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
singleRun: false,
restartOnFileChange: true
});
Expand Down
7 changes: 5 additions & 2 deletions package.json
Expand Up @@ -3,11 +3,14 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "node server.js",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"build-prod": "ng build --prod",
"test-headless": "ng test --watch=false --code-coverage",
"preinstall": "npm install -g angular-cli"
},
"private": true,
"dependencies": {
Expand Down
14 changes: 14 additions & 0 deletions server.js
@@ -0,0 +1,14 @@
const express = require('express');
const path = require('path');
const app = express();

// Serve static files....
app.use(express.static(__dirname + '/dist/web'));

// Send all requests to index.html
app.get('/*', function(req, res) {
res.sendFile(path.join(__dirname + '/dist/web/index.html'));
});

// default Heroku PORT 3000
app.listen(process.env.PORT || 3000);
11 changes: 11 additions & 0 deletions sonar-project.properties
@@ -0,0 +1,11 @@
sonar.projectKey=speech4j_speech-to-text-comparator-ui
sonar.organization=speech4j
sonar.projectName=speech-to-text-comparator-ui
sonar.projectVersion=1.0
sonar.sources=src
sonar.sourceEncoding=UTF-8
sonar.exclusions=**/node_modules/**,**/*.spec.ts
sonar.tests=src/app
sonar.test.inclusions=**/*.spec.ts
sonar.ts.tslint.configPath=tslint.json
sonar.typescript.lcov.reportPaths=coverage/web/lcov.info

0 comments on commit 785db22

Please sign in to comment.