Skip to content

Commit

Permalink
Merge branch 'master' into TIMOB-27354
Browse files Browse the repository at this point in the history
  • Loading branch information
lokeshchdhry committed Oct 2, 2019
2 parents 578da73 + 79ac7bb commit 9ccecc9
Show file tree
Hide file tree
Showing 10 changed files with 1,584 additions and 1,147 deletions.
11 changes: 11 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
node_modules
# We don't want to lint the locale files with eslint
**/locales/**/*.js

android/runtime/v8/tools/bootstrap.js
android/dev
android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/*.js

iphone/Resources/app.js

# TODO: We probably do want to lint these eventually!
templates/**
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ retirejs.output.json

/titanium-mobile-mocha-suite
junit.*.xml
junit_report.xml

# intelliJ Android User-specific configurations
/android/.idea/libraries/
Expand All @@ -43,3 +44,6 @@ junit.*.xml

.vscode/
/android/runtime/v8/src/native/V8Snapshots.h

.nyc_output/
coverage/
153 changes: 0 additions & 153 deletions Gruntfile.js

This file was deleted.

26 changes: 26 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,27 @@ def unitTests(os, nodeVersion, npmVersion, testSuiteBranch, testOnDevices) {
}
}

def cliUnitTests(nodeVersion, npmVersion) {
return {
node('git && osx') { // ToDo: refactor to try and run across mac, linux, and windows?
unstash 'cli-unit-tests'
nodejs(nodeJSInstallationName: "node ${nodeVersion}") {
ensureNPM(npmVersion)
sh 'npm ci'
try {
sh 'npm run test:cli'
} finally {
if (fileExists('coverage/cobertura-coverage.xml')) {
step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'coverage/cobertura-coverage.xml', failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false])
}
stash includes: 'junit.cli.report.xml', name: 'test-report-cli'
junit 'junit.cli.report.xml'
}
}
}
}
}

// Wrap in timestamper
timestamps {
try {
Expand Down Expand Up @@ -217,6 +238,7 @@ timestamps {
if (runDanger) { // Stash files for danger.js later
stash includes: 'package.json,package-lock.json,dangerfile.js,.eslintignore,.eslintrc,npm_test.log,android/**/*.java', name: 'danger'
}
stash includes: 'package.json,package-lock.json,android/cli/**,iphone/cli/**', name: 'cli-unit-tests'
// was it a failure?
if (npmTestResult != 0) {
error readFile('npm_test.log')
Expand Down Expand Up @@ -296,6 +318,7 @@ timestamps {
parallel(
'android unit tests': unitTests('android', nodeVersion, npmVersion, targetBranch, testOnDevices),
'iOS unit tests': unitTests('ios', nodeVersion, npmVersion, targetBranch, testOnDevices),
'cli unit tests': cliUnitTests(nodeVersion, npmVersion),
failFast: true
)
}
Expand Down Expand Up @@ -465,6 +488,9 @@ timestamps {
try {
unstash 'test-report-android' // junit.android.report.xml
} catch (e) {}
try {
unstash 'test-report-cli' // junit.android.report.xml
} catch (e) {}
ensureNPM(npmVersion)
sh 'npm ci'
// FIXME We need to hack the env vars for Danger.JS because it assumes Github Pull Request Builder plugin only
Expand Down
155 changes: 0 additions & 155 deletions android/cli/tests/run.js

This file was deleted.

0 comments on commit 9ccecc9

Please sign in to comment.