mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
TypeScript JsonBuilder ci update
This commit is contained in:
@@ -2,6 +2,17 @@ const {
|
||||
Graph
|
||||
} = require('@yandex-int/tkit');
|
||||
|
||||
const useSelectivity = !process.argv.includes('--skipSelectivity') && !process.env.SKIP_SELECTIVITY;
|
||||
const projectPrefix = 'public/json-builder/typescript';
|
||||
|
||||
function prepareSelectivity(list) {
|
||||
if (useSelectivity) {
|
||||
return list;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const graph = new Graph({
|
||||
repo: {},
|
||||
failOnStepFailure: false,
|
||||
@@ -9,50 +20,53 @@ const graph = new Graph({
|
||||
hideIntermediate: true,
|
||||
stopOnUpdate: false
|
||||
});
|
||||
|
||||
const treeConfig = {
|
||||
'check:ts': null,
|
||||
'check:eslint': null,
|
||||
'check:prettier': null,
|
||||
'test:unit': null
|
||||
'ts-jsonbuilder:check:ts': null,
|
||||
'ts-jsonbuilder:check:eslint': null,
|
||||
'ts-jsonbuilder:check:prettier': null,
|
||||
'ts-jsonbuilder:test:unit': null
|
||||
};
|
||||
|
||||
const steps = {
|
||||
'check:ts': [
|
||||
'ts-jsonbuilder:check:ts': [
|
||||
'npx tsc --noEmit',
|
||||
{
|
||||
files: [
|
||||
'tsconfig.json',
|
||||
'**.ts',
|
||||
'package.json'
|
||||
]
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/tsconfig.json`,
|
||||
`${projectPrefix}/**/*.ts`,
|
||||
`${projectPrefix}/package.json`,
|
||||
'public/schema/**'
|
||||
])
|
||||
}
|
||||
],
|
||||
'check:eslint': [
|
||||
'ts-jsonbuilder:check:eslint': [
|
||||
'npx eslint "src/**/*.ts" "test/**/*.ts"',
|
||||
{
|
||||
files: [
|
||||
'**.js',
|
||||
'**.ts',
|
||||
'.eslintrc.json'
|
||||
]
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/**/*.js`,
|
||||
`${projectPrefix}/**/*.ts`,
|
||||
`${projectPrefix}/.eslintrc.json`
|
||||
])
|
||||
}
|
||||
],
|
||||
'check:prettier': [
|
||||
'ts-jsonbuilder:check:prettier': [
|
||||
'npx prettier --check "src/**/*.ts" "test/**/*.ts"',
|
||||
{
|
||||
files: [
|
||||
'**.js',
|
||||
'**.ts'
|
||||
]
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/**/*.js`,
|
||||
`${projectPrefix}/**/*.ts`
|
||||
])
|
||||
}
|
||||
],
|
||||
'test:unit': [
|
||||
'ts-jsonbuilder:test:unit': [
|
||||
'npx jest',
|
||||
{
|
||||
files: [
|
||||
'**.ts',
|
||||
'**.snap'
|
||||
]
|
||||
files: prepareSelectivity([
|
||||
`${projectPrefix}/**/*.ts`,
|
||||
`${projectPrefix}/**/*.snap`,
|
||||
'public/schema/**'
|
||||
])
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
echo "node `node -v`"
|
||||
echo "npm `npm -v`"
|
||||
python3 --version
|
||||
|
||||
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 gen
|
||||
node ci/checks.js
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@divkitframework/jsonbuilder",
|
||||
"version": "1.5.0",
|
||||
"version": "13.0.0",
|
||||
"description": "DivKit TypeScript JSON Builder",
|
||||
"main": "./dist/jsonbuilder.js",
|
||||
"module": "./dist/es/jsonbuilder.js",
|
||||
|
||||
Reference in New Issue
Block a user