mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-4608] Use smartrunner version 2 and add SuperCache (workspaces + S3 combo)! (#6704)
* [AAE-4608] Use smartrunner version 2 * Fix npm installing and do not depend on develop cache * Add Travis workspaces the simplest way * Add missing dependencies * Remove unnecessary npm install on lint * Fix travis indentation * Fix e2e missing adf packages * Trying to fix Travis * Remove debug information * Use Travis workspaces for smartrunner and built artefacts caching instead of S3 * Implement nuclear caching for node_modules * Quiet snyk running, since the log length kills Travis * Maybe with -q * Quieting snyk * Why displaying the added packages?????? * Fix S3 persister/retriever scripts * Restore back parallel build and lint, to gain 10 minutes
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
const {LocalStorageUtil, Logger} = require('@alfresco/adf-testing');
|
||||
const path = require('path');
|
||||
const {SpecReporter} = require('jasmine-spec-reporter');
|
||||
const retry = require('protractor-retry').retry;
|
||||
const retry = require('protractor-retry-angular-cli').retry;
|
||||
const tsConfig = require('./tsconfig.e2e.json');
|
||||
const testConfig = require('./test.config');
|
||||
const RESOURCES = require('./util/resources');
|
||||
const SmartRunner = require('protractor-smartrunner');
|
||||
const resolve = require('path').resolve;
|
||||
const fs = require('fs');
|
||||
const smartRunnerFactory = require('./smartrunner-factory');
|
||||
|
||||
const {uploadScreenshot} = require('./protractor/save-remote');
|
||||
const argv = require('yargs').argv;
|
||||
@@ -166,9 +166,7 @@ exports.config = {
|
||||
includeStackTrace: true,
|
||||
print: () => {
|
||||
},
|
||||
...SmartRunner.withOptionalExclusions(
|
||||
resolve(__dirname, './protractor.excludes.json')
|
||||
)
|
||||
...(process.env.CI ? smartRunnerFactory.applyExclusionFilter() : {} )
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -200,11 +198,7 @@ exports.config = {
|
||||
async onPrepare() {
|
||||
if (process.env.CI) {
|
||||
retry.onPrepare();
|
||||
const repoHash = process.env.GIT_HASH || '';
|
||||
const outputDirectory = process.env.SMART_RUNNER_DIRECTORY;
|
||||
console.log(`SmartRunner's repoHash: "${repoHash}"`);
|
||||
console.log(`SmartRunner's outputDirectory: "${outputDirectory}"`);
|
||||
SmartRunner.apply({outputDirectory, repoHash});
|
||||
smartRunnerFactory.getInstance().onPrepare();
|
||||
}
|
||||
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = TIMEOUT;
|
||||
@@ -282,7 +276,7 @@ exports.config = {
|
||||
|
||||
},
|
||||
|
||||
afterLaunch: async function () {
|
||||
afterLaunch: async function (statusCode) {
|
||||
if (SAVE_SCREENSHOT) {
|
||||
console.log(`Save screenshot enabled`);
|
||||
|
||||
@@ -299,7 +293,7 @@ exports.config = {
|
||||
console.log(`Save screenshot disabled`);
|
||||
}
|
||||
|
||||
return retry.afterLaunch(MAX_RETRIES);
|
||||
return retry.afterLaunch(MAX_RETRIES, statusCode);
|
||||
}
|
||||
|
||||
};
|
||||
|
14
e2e/smartrunner-factory.js
Normal file
14
e2e/smartrunner-factory.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const SmartRunnerFactory = require('protractor-smartrunner').SmartRunnerFactory;
|
||||
const resolve = require('path').resolve;
|
||||
|
||||
const outputDirectory = process.env.SMART_RUNNER_DIRECTORY;
|
||||
const repoHash = process.env.GIT_HASH;
|
||||
|
||||
console.log(`SmartRunner's repoHash: "${repoHash}"`);
|
||||
console.log(`SmartRunner's outputDirectory: "${outputDirectory}"`);
|
||||
|
||||
module.exports = new SmartRunnerFactory({
|
||||
repoHash,
|
||||
...(outputDirectory ? { outputDirectory: resolve(__dirname, '..', outputDirectory) } : {}),
|
||||
exclusionPath: resolve(__dirname, 'protractor.excludes.json')
|
||||
});
|
Reference in New Issue
Block a user