mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
fix sync
This commit is contained in:
@@ -1,156 +0,0 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const chai = require('chai');
|
||||
|
||||
const tunnelerLocalPort = process.env.LOCAL_PORT || 8081;
|
||||
const localGrid = !!process.env.HERMIONE_LOCAL_GRID;
|
||||
const isGui = process.argv.includes('gui');
|
||||
|
||||
const retry = process.env.HERMIONE_RETRY !== undefined ?
|
||||
Number(process.env.HERMIONE_RETRY) :
|
||||
(isGui ? 0 : 10);
|
||||
|
||||
// RESULT_RESOURCES_PATH определяется в кубике common/misc/run_command
|
||||
// https://a.yandex-team.ru/arc_vcs/ci/registry/common/misc
|
||||
const HTML_REPORT_DIR = `hermione-gui-report`;
|
||||
|
||||
chai.config.includeStack = true;
|
||||
chai.Should();
|
||||
// chai.use(chaiAsPromised);
|
||||
global.assert = chai.assert;
|
||||
|
||||
const plugins = {
|
||||
'static-server': {
|
||||
// path: path.resolve(__dirname, 'tests/hermione/static'),
|
||||
path: path.resolve(__dirname, '../../../..'),
|
||||
port: tunnelerLocalPort
|
||||
},
|
||||
'html-reporter/hermione': {
|
||||
path: HTML_REPORT_DIR
|
||||
},
|
||||
// '@yandex-int/tunneler/hermione': {
|
||||
// enabled: true,
|
||||
// tunnelerOpts: {
|
||||
// localport: tunnelerLocalPort,
|
||||
// user: process.env.tunneler_user || process.env.USER,
|
||||
// sshRetries: 5,
|
||||
// ports: {
|
||||
// min: 1001,
|
||||
// max: 65535,
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
'@yandex-int/hermione-surfwax-router': {
|
||||
enabled: Boolean(process.env.TEAMCITY_VERSION || process.env.CI)
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
sets: {
|
||||
all: {
|
||||
files: '../tests/hermione/**/*.hermione.js'
|
||||
}
|
||||
},
|
||||
|
||||
browsers: {
|
||||
chromeMobile: {
|
||||
screenshotMode: 'viewport',
|
||||
// windowSize: '360x640',
|
||||
desiredCapabilities: {
|
||||
browserName: 'chrome',
|
||||
browserVersion: '90.0',
|
||||
acceptInsecureCerts: true,
|
||||
'goog:chromeOptions': {
|
||||
mobileEmulation: {
|
||||
// deviceName: 'Google Nexus 5',
|
||||
deviceMetrics: {
|
||||
width: 360,
|
||||
height: 640,
|
||||
pixelRatio: 2.0
|
||||
},
|
||||
userAgent: 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.3497.81 Mobile Safari/537.36 Hermione/1'
|
||||
},
|
||||
args: [
|
||||
'headless',
|
||||
'hide-scrollbars',
|
||||
'disable-gpu'
|
||||
]
|
||||
}
|
||||
},
|
||||
meta: {platform: 'touch'}
|
||||
},
|
||||
firefoxMobile: {
|
||||
windowSize: '360x640',
|
||||
resetCursor: false,
|
||||
desiredCapabilities: {
|
||||
browserName: 'firefox',
|
||||
browserVersion: '69.0',
|
||||
acceptInsecureCerts: true,
|
||||
'moz:firefoxOptions': {
|
||||
prefs: {
|
||||
'general.useragent.override': 'Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 Hermione/1'
|
||||
}
|
||||
}
|
||||
},
|
||||
meta: {platform: 'touch'}
|
||||
}
|
||||
},
|
||||
|
||||
plugins,
|
||||
|
||||
retry,
|
||||
|
||||
sessionsPerBrowser: localGrid ? 1 : 5,
|
||||
testsPerSession: 10,
|
||||
|
||||
gridUrl: localGrid ?
|
||||
'http://localhost:4444/wd/hub' :
|
||||
`http://morda@sw.yandex-team.ru:80/v0`,
|
||||
|
||||
httpTimeout: 30000,
|
||||
pageLoadTimeout: 20000,
|
||||
sessionRequestTimeout: 150000,
|
||||
sessionQuitTimeout: 5000,
|
||||
waitTimeout: 10000,
|
||||
|
||||
compositeImage: true,
|
||||
antialiasingTolerance: 4,
|
||||
|
||||
system: {
|
||||
debug: false,
|
||||
|
||||
// workers: 4,
|
||||
|
||||
// Recommendation: use ctx in your tests in favor of global variables.
|
||||
ctx: {
|
||||
}
|
||||
},
|
||||
|
||||
screenshotDelay: 400,
|
||||
screenshotsDir: (test) => {
|
||||
let basePath = '../tests/hermione/screens/';
|
||||
let testPath = '';
|
||||
let parent = test.parent;
|
||||
|
||||
while(parent) {
|
||||
testPath = path.join(parent.title, testPath);
|
||||
parent = parent.parent;
|
||||
}
|
||||
|
||||
return path.join(__dirname, basePath, testPath, test.title, test.browserId);
|
||||
},
|
||||
|
||||
prepareBrowser: function (browser) {
|
||||
// chaiAsPromised.transferPromiseness = browser.transferPromiseness;
|
||||
|
||||
const commandsDir = path.resolve(__dirname, '../tests/hermione/commands');
|
||||
|
||||
fs.readdirSync(commandsDir)
|
||||
.filter(function(name) {
|
||||
return path.extname(name) === '.js' && fs.statSync(path.resolve(commandsDir, name)).isFile();
|
||||
})
|
||||
.forEach(function(filename) {
|
||||
browser.addCommand(path.basename(filename, '.js'), require(path.resolve(commandsDir, filename)));
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,2 +0,0 @@
|
||||
registry=https://npm.yandex-team.ru/
|
||||
save-exact=true
|
||||
@@ -1,123 +0,0 @@
|
||||
const {
|
||||
Graph
|
||||
} = require('@yandex-int/tkit');
|
||||
|
||||
const useSelectivity = !process.argv.includes('--skipSelectivity');
|
||||
const projectPrefix = 'public/client/web/divkit';
|
||||
|
||||
function prepareSelectivity(list) {
|
||||
if (useSelectivity) {
|
||||
return list;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const graph = new Graph({
|
||||
repo: {},
|
||||
failOnStepFailure: false,
|
||||
selective: true,
|
||||
hideIntermediate: true,
|
||||
stopOnUpdate: false
|
||||
});
|
||||
|
||||
const treeConfig = {
|
||||
'web:check:ts': null,
|
||||
'web:check:eslint': null,
|
||||
'web:check:svelte': null,
|
||||
'web:build:prod': null,
|
||||
'web:test:unit': ['web:build:prod'],
|
||||
'web:test:hermione': ['web:build:prod'],
|
||||
};
|
||||
|
||||
const steps = {
|
||||
'web:check:ts': [
|
||||
'npm run check:ts',
|
||||
{
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/tsconfig.json`,
|
||||
`${projectPrefix}/**/*.svelte`,
|
||||
`${projectPrefix}/!**/!*.ts`,
|
||||
`${projectPrefix}/package.json`
|
||||
])
|
||||
}
|
||||
],
|
||||
'web:check:eslint': [
|
||||
'npm run check:eslint',
|
||||
{
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/**/*.js`,
|
||||
`${projectPrefix}/!**!/!*.ts`,
|
||||
`${projectPrefix}/!**/!*.svelte`,
|
||||
`${projectPrefix}/tsconfig.json`,
|
||||
`${projectPrefix}/package.json`,
|
||||
`${projectPrefix}/.eslintrc.js`
|
||||
])
|
||||
}
|
||||
],
|
||||
'web:check:svelte': [
|
||||
'npm run check:svelte',
|
||||
{
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/**/*.svelte`,
|
||||
`${projectPrefix}/!**/!*.ts`,
|
||||
`${projectPrefix}/package.json`
|
||||
])
|
||||
}
|
||||
],
|
||||
'web:build:prod': [
|
||||
'npm run build:prod',
|
||||
{
|
||||
intermediate: true,
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/src/**`,
|
||||
`${projectPrefix}/tests/**`,
|
||||
`${projectPrefix}/webpack.config.js`,
|
||||
'public/test_data/!**'
|
||||
])
|
||||
}
|
||||
],
|
||||
'web:test:unit': [
|
||||
'npm run test:unit',
|
||||
{
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/**/*.ts`,
|
||||
`${projectPrefix}/tests/templates`,
|
||||
`${projectPrefix}/tests/utils`,
|
||||
`${projectPrefix}/tools`,
|
||||
`${projectPrefix}/package.json`,
|
||||
`${projectPrefix}/jest.config.js`,
|
||||
`${projectPrefix}/webpack.config.js`,
|
||||
'public/test_data/!**'
|
||||
])
|
||||
}
|
||||
],
|
||||
'web:test:hermione': [
|
||||
'npm run test:hermione',
|
||||
{
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/src/**`,
|
||||
`${projectPrefix}/tests/hermione/**`,
|
||||
`${projectPrefix}/.hermione.conf.js`,
|
||||
`${projectPrefix}/package.json`,
|
||||
`${projectPrefix}/webpack.config.js`,
|
||||
'public/test_data/!**'
|
||||
]),
|
||||
report: 'ci/hermione-gui-report',
|
||||
main: 'index.html',
|
||||
attributes: {
|
||||
project: 'home',
|
||||
tool: 'hermione',
|
||||
type: 'hermione-report',
|
||||
review_request: process.env.ARC_BRANCH
|
||||
},
|
||||
type: 'SANDBOX_CI_ARTIFACT'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
graph.run(treeConfig, steps)
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
Generated
-14137
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "ci",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"main": "checks.js",
|
||||
"scripts": {},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "UNLICENSED",
|
||||
"devDependencies": {
|
||||
"@yandex-int/hermione-surfwax-router": "0.4.1",
|
||||
"@yandex-int/tkit": "1.11.1",
|
||||
"hermione": "5.0.1",
|
||||
"hermione-static-server": "1.1.1",
|
||||
"html-reporter": "9.2.2"
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
set -ex
|
||||
|
||||
aws --endpoint-url=http://s3.mds.yandex.net s3 cp --recursive \
|
||||
"dist/browser/" \
|
||||
"s3://$BUCKET/$VERSION" \
|
||||
--exclude '*' \
|
||||
--include '*.css' \
|
||||
--include '*.js'
|
||||
|
||||
aws --endpoint-url=http://s3.mds.yandex.net s3 cp --recursive \
|
||||
"dist/browser/" \
|
||||
"s3://$BUCKET/$VERSION" \
|
||||
--exclude '*' \
|
||||
--include '*.css.gz' \
|
||||
--include '*.css.br' \
|
||||
--no-guess-mime-type \
|
||||
--content-type="text/css"
|
||||
|
||||
aws --endpoint-url=http://s3.mds.yandex.net s3 cp --recursive \
|
||||
"dist/browser/" \
|
||||
"s3://$BUCKET/$VERSION" \
|
||||
--exclude '*' \
|
||||
--include '*.js.gz' \
|
||||
--include '*.js.br' \
|
||||
--no-guess-mime-type \
|
||||
--content-type="application/javascript"
|
||||
|
||||
aws --endpoint-url=http://s3.mds.yandex.net s3 cp --recursive \
|
||||
"dist/browser/" \
|
||||
"s3://$BUCKET/$VERSION" \
|
||||
--exclude '*' \
|
||||
--include '*.map' \
|
||||
--no-guess-mime-type \
|
||||
--content-type="application/json"
|
||||
|
||||
aws --endpoint-url=http://s3.mds.yandex.net s3 cp \
|
||||
"dist/client.css" "s3://$BUCKET/$VERSION/client.css"
|
||||
aws --endpoint-url=http://s3.mds.yandex.net s3 cp \
|
||||
"dist/client.css.gz" "s3://$BUCKET/$VERSION/client.css.gz" --content-type="text/css"
|
||||
aws --endpoint-url=http://s3.mds.yandex.net s3 cp \
|
||||
"dist/client.css.br" "s3://$BUCKET/$VERSION/client.css.br" --content-type="text/css"
|
||||
aws --endpoint-url=http://s3.mds.yandex.net s3 cp \
|
||||
"dist/client.css.map" "s3://$BUCKET/$VERSION/client.css.map" --content-type="application/json"
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "node `node -v`"
|
||||
echo "npm `npm -v`"
|
||||
|
||||
# setup private ssh key
|
||||
echo "$ROBOT_SSH_KEY" > id_rsa
|
||||
chmod 400 id_rsa
|
||||
ssh-add id_rsa
|
||||
|
||||
export PYTHONPATH=/home/zomb-sandbox/client:$PYTHONPATH
|
||||
|
||||
export checkout_config="{
|
||||
\"commit\": \"$TARGET_REVISION_HASH\",
|
||||
\"type\": \"arc\",
|
||||
\"mount_path\": \"$RESULT_RESOURCES_PATH/arc_mount\"
|
||||
}"
|
||||
|
||||
npm ci
|
||||
cd ci && npm ci && cd -
|
||||
npm run build:prod
|
||||
npm run test:hermione:update
|
||||
|
||||
arc co -b update-screens-${TARGET_REVISION_HASH}
|
||||
cd tests && arc add . && cd -
|
||||
arc status .
|
||||
arc commit -m "DIVKIT-0: Update screens"
|
||||
arc push
|
||||
arc log . -n 1 --oneline
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
echo "node `node -v`"
|
||||
echo "npm `npm -v`"
|
||||
|
||||
# setup private ssh key
|
||||
echo "$ROBOT_SSH_KEY" > id_rsa
|
||||
chmod 400 id_rsa
|
||||
ssh-add id_rsa
|
||||
|
||||
export PYTHONPATH=/home/zomb-sandbox/client:$PYTHONPATH
|
||||
|
||||
export checkout_config="{
|
||||
\"commit\": \"$TARGET_REVISION_HASH\",
|
||||
\"type\": \"arc\",
|
||||
\"mount_path\": \"$RESULT_RESOURCES_PATH/arc_mount\"
|
||||
}"
|
||||
|
||||
npm ci
|
||||
cd ci && npm ci && cd -
|
||||
node ci/checks.js
|
||||
@@ -1 +0,0 @@
|
||||
/node_modules
|
||||
@@ -1,2 +0,0 @@
|
||||
registry=https://npm.yandex-team.ru/
|
||||
save-exact=true
|
||||
@@ -1,64 +0,0 @@
|
||||
const {
|
||||
Graph
|
||||
} = require('@yandex-int/tkit');
|
||||
|
||||
const graph = new Graph({
|
||||
repo: {},
|
||||
failOnStepFailure: false,
|
||||
selective: true,
|
||||
hideIntermediate: true,
|
||||
stopOnUpdate: false
|
||||
});
|
||||
const treeConfig = {
|
||||
'check:ts': null,
|
||||
'check:eslint': null,
|
||||
'check:prettier': null,
|
||||
'test:unit': null
|
||||
};
|
||||
|
||||
const steps = {
|
||||
'check:ts': [
|
||||
'npx tsc --noEmit',
|
||||
{
|
||||
files: [
|
||||
'tsconfig.json',
|
||||
'**.ts',
|
||||
'package.json'
|
||||
]
|
||||
}
|
||||
],
|
||||
'check:eslint': [
|
||||
'npx eslint "src/**/*.ts" "test/**/*.ts"',
|
||||
{
|
||||
files: [
|
||||
'**.js',
|
||||
'**.ts',
|
||||
'.eslintrc.json'
|
||||
]
|
||||
}
|
||||
],
|
||||
'check:prettier': [
|
||||
'npx prettier --check "src/**/*.ts" "test/**/*.ts"',
|
||||
{
|
||||
files: [
|
||||
'**.js',
|
||||
'**.ts'
|
||||
]
|
||||
}
|
||||
],
|
||||
'test:unit': [
|
||||
'npx jest',
|
||||
{
|
||||
files: [
|
||||
'**.ts',
|
||||
'**.snap'
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
graph.run(treeConfig, steps)
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"name": "ci",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "1.0.0",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@yandex-int/tkit": "1.11.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@yandex-int/tkit": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://npm.yandex-team.ru/@yandex-int%2ftkit/-/tkit-1.11.1.tgz?rbtorrent=94eeee5dcf07d70dd9540ad866fdd35275b0a8be",
|
||||
"integrity": "sha512-ruudm5za2njo43ltXF4rI3Foc3UgDpMvpqWBlszW7GXQKZQdbQR0cracKuRnZgpgi1eheQHAANE8PSsuc8IKxg==",
|
||||
"license": "UNLICENSED",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@yandex-int/tkit": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://npm.yandex-team.ru/@yandex-int%2ftkit/-/tkit-1.11.1.tgz?rbtorrent=94eeee5dcf07d70dd9540ad866fdd35275b0a8be",
|
||||
"integrity": "sha512-ruudm5za2njo43ltXF4rI3Foc3UgDpMvpqWBlszW7GXQKZQdbQR0cracKuRnZgpgi1eheQHAANE8PSsuc8IKxg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "ci",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"main": "checks.js",
|
||||
"scripts": {},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@yandex-int/tkit": "1.11.1"
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
const {Graph} = require('@yandex-int/tkit');
|
||||
|
||||
(async function () {
|
||||
const graph = new Graph({
|
||||
repo: {},
|
||||
subscribers: [],
|
||||
failOnStepFailure: false,
|
||||
selective: true,
|
||||
hideIntermediate: true,
|
||||
stopOnUpdate: false
|
||||
});
|
||||
|
||||
const treeConfig = {
|
||||
'client modules': null,
|
||||
'server modules': null,
|
||||
'lint server': ['server modules'],
|
||||
'lint client': ['client modules'],
|
||||
'svelte check': ['client modules']
|
||||
};
|
||||
const steps = {
|
||||
'client modules': [
|
||||
'cd client && npm ci',
|
||||
{
|
||||
intermediate: true
|
||||
}
|
||||
],
|
||||
'server modules': [
|
||||
'cd server && npm ci',
|
||||
{
|
||||
intermediate: true
|
||||
}
|
||||
],
|
||||
'lint server': [
|
||||
'npm run lint-server',
|
||||
{
|
||||
files: [
|
||||
'.eslintrc.js',
|
||||
'server/**'
|
||||
]
|
||||
}
|
||||
],
|
||||
'lint client': [
|
||||
'npm run lint-client',
|
||||
{
|
||||
files: [
|
||||
'.eslintrc.js',
|
||||
'client/**'
|
||||
]
|
||||
}
|
||||
],
|
||||
'svelte check': [
|
||||
'cd client && npm run check',
|
||||
{
|
||||
files: [
|
||||
'client/**'
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return graph.run(treeConfig, steps);
|
||||
})()
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user