ci: Add lint check to the build step (#21442)
Add a step to verify lint rules in client build workflow. --------- Co-authored-by: Satish Gandham <hello@satishgandham.com>
This commit is contained in:
parent
fd2353c895
commit
b2828dfe93
12
.github/workflows/client-build.yml
vendored
12
.github/workflows/client-build.yml
vendored
|
|
@ -99,6 +99,18 @@ jobs:
|
|||
- name: Install dependencies
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Run Eslint
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
run: yarn run lint:ci
|
||||
|
||||
- name: Run Prettier
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
run: yarn run prettier:ci
|
||||
|
||||
- name: Run type import check
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
run: yarn run check-types
|
||||
|
||||
- name: Set the build environment based on the branch
|
||||
if: steps.run_result.outputs.run_result != 'success'
|
||||
|
|
|
|||
|
|
@ -4,3 +4,5 @@ package-lock.json
|
|||
yarn.lock
|
||||
package.json
|
||||
src/assets/lottie/
|
||||
cypress/fixtures
|
||||
cypress/locators/
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
{
|
||||
"extends": ["../.eslintrc.json"],
|
||||
"env": {
|
||||
"cypress/globals": true
|
||||
},
|
||||
"rules": {
|
||||
"cypress/no-unnecessary-waiting": 0
|
||||
},
|
||||
"extends": [
|
||||
"plugin:cypress/recommended"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,4 +30,4 @@ services:
|
|||
|
||||
networks:
|
||||
appsmith:
|
||||
driver: bridge
|
||||
driver: bridge
|
||||
|
|
|
|||
|
|
@ -31,7 +31,10 @@ describe("Abort Action Execution", function () {
|
|||
"AbortQuery",
|
||||
);
|
||||
_.dataSources.SetQueryTimeout(0);
|
||||
_.dataSources.RunQuery({toValidateResponse: false, waitTimeInterval:0});
|
||||
_.dataSources.RunQuery({
|
||||
toValidateResponse: false,
|
||||
waitTimeInterval: 0,
|
||||
});
|
||||
_.agHelper.GetNClick(_.locators._cancelActionExecution, 0, true);
|
||||
_.agHelper.AssertContains(
|
||||
createMessage(ACTION_EXECUTION_CANCELLED, "AbortQuery"),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ describe("Error logged when adding a suggested table widget", function () {
|
|||
cy.fixture("datasources").then((datasourceFormData: any) => {
|
||||
_.apiPage.CreateAndFillApi(datasourceFormData["mockApiUrl"], "Api1");
|
||||
_.apiPage.RunAPI();
|
||||
_.dataSources.AddSuggesstedWidget(Widgets.Table)
|
||||
_.dataSources.AddSuggesstedWidget(Widgets.Table);
|
||||
_.debuggerHelper.AssertErrorCount(0);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {
|
|||
|
||||
it("10. Verify application does not break when user runs the query with wrong table name", function () {
|
||||
ee.SelectEntityByName("DropProductlines", "Queries/JS");
|
||||
dataSources.RunQuery({toValidateResponse:false});
|
||||
dataSources.RunQuery({ toValidateResponse: false });
|
||||
cy.wait("@postExecute").then(({ response }) => {
|
||||
expect(response?.body.data.isExecutionSuccess).to.eq(false);
|
||||
expect(
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
|
|||
|
||||
it("18. Verify application does not break when user runs the query with wrong table name", function () {
|
||||
ee.SelectEntityByName("DropVessels", "Queries/JS");
|
||||
dataSources.RunQuery({toValidateResponse:false});
|
||||
dataSources.RunQuery({ toValidateResponse: false });
|
||||
cy.wait("@postExecute").then(({ response }) => {
|
||||
expect(response?.body.data.isExecutionSuccess).to.eq(false);
|
||||
expect(
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ describe("MySQL Datatype tests", function () {
|
|||
_.deployMode.NavigateBacktoEditor();
|
||||
_.entityExplorer.ExpandCollapseEntity("Queries/JS");
|
||||
_.entityExplorer.SelectEntityByName("selectRecords");
|
||||
_.dataSources.RunQuery({toValidateResponse:false});
|
||||
_.dataSources.RunQuery({ toValidateResponse: false });
|
||||
cy.wait("@postExecute").then((intercept) => {
|
||||
expect(
|
||||
typeof intercept.response?.body.data.body[5].varchar_column,
|
||||
|
|
|
|||
|
|
@ -661,7 +661,7 @@ describe("Validate Mongo Query Pane Validations", () => {
|
|||
agHelper.FocusElement(locator._codeMirrorTextArea);
|
||||
//agHelper.VerifyEvaluatedValue(tableCreateQuery);
|
||||
|
||||
dataSources.RunQuery({expectedStatus: false});
|
||||
dataSources.RunQuery({ expectedStatus: false });
|
||||
agHelper
|
||||
.GetText(dataSources._queryError)
|
||||
.then(($errorText) => expect($errorText).to.eq("ns not found."));
|
||||
|
|
|
|||
|
|
@ -821,7 +821,7 @@ export class AggregateHelper {
|
|||
input.setValue(value);
|
||||
this.Sleep(200);
|
||||
});
|
||||
this.Sleep(500);//for value set to settle
|
||||
this.Sleep(500); //for value set to settle
|
||||
}
|
||||
|
||||
public UpdateInput(selector: string, value: string) {
|
||||
|
|
|
|||
|
|
@ -26,10 +26,7 @@
|
|||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"typeRoots": [
|
||||
"./typings",
|
||||
"./node_modules/@types"
|
||||
],
|
||||
"typeRoots": ["./typings", "./node_modules/@types"],
|
||||
"sourceMap": true,
|
||||
"baseUrl": "./cypress",
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,28 @@
|
|||
"packages/*"
|
||||
],
|
||||
"cracoConfig": "craco.dev.config.js",
|
||||
"scripts": {
|
||||
"analyze": "yarn cra-bundle-analyzer",
|
||||
"start": "BROWSER=none EXTEND_ESLINT=true REACT_APP_ENVIRONMENT=DEVELOPMENT REACT_APP_CLIENT_LOG_LEVEL=debug HOST=dev.appsmith.com craco start",
|
||||
"build": "./build.sh",
|
||||
"build-local": "craco --max-old-space-size=4096 build --config craco.build.config.js",
|
||||
"build-staging": "REACT_APP_ENVIRONMENT=STAGING craco --max-old-space-size=4096 build --config craco.build.config.js",
|
||||
"test": "CYPRESS_BASE_URL=https://dev.appsmith.com cypress/test.sh",
|
||||
"test:ci": "CYPRESS_BASE_URL=https://dev.appsmith.com cypress/test.sh --env=ci",
|
||||
"eject": "react-scripts eject",
|
||||
"start-prod": "REACT_APP_ENVIRONMENT=PRODUCTION craco start",
|
||||
"cytest": "REACT_APP_TESTING=TESTING REACT_APP_ENVIRONMENT=DEVELOPMENT craco start & ./node_modules/.bin/cypress open",
|
||||
"test:unit": "$(npm bin)/jest -b --colors --no-cache --silent --coverage --collectCoverage=true --coverageDirectory='../../' --coverageReporters='json-summary'",
|
||||
"test:jest": "$(npm bin)/jest --watch",
|
||||
"generate:widget": "plop --plopfile generators/index.js",
|
||||
"postinstall": "patch-package && CURRENT_SCOPE=client node ../shared/install-dependencies.js",
|
||||
"preinstall": "CURRENT_SCOPE=client node ../shared/build-shared-dep.js",
|
||||
"install": "node cypress/apply-patches.js",
|
||||
"storybook": "yarn workspace @design-system/storybook storybook",
|
||||
"lint:ci": "eslint --ext .ts,.tsx ./src && eslint --ext .js ./cypress",
|
||||
"prettier:ci": "prettier --check ./src && prettier --check ./cypress",
|
||||
"check-types": "yarn tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blueprintjs/core": "^3.36.0",
|
||||
"@blueprintjs/datetime": "^3.23.6",
|
||||
|
|
@ -172,25 +194,7 @@
|
|||
"yjs": "^13.5.12",
|
||||
"zipcelx": "^1.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
"analyze": "yarn cra-bundle-analyzer",
|
||||
"start": "BROWSER=none EXTEND_ESLINT=true REACT_APP_ENVIRONMENT=DEVELOPMENT REACT_APP_CLIENT_LOG_LEVEL=debug HOST=dev.appsmith.com craco start",
|
||||
"build": "./build.sh",
|
||||
"build-local": "craco --max-old-space-size=4096 build --config craco.build.config.js",
|
||||
"build-staging": "REACT_APP_ENVIRONMENT=STAGING craco --max-old-space-size=4096 build --config craco.build.config.js",
|
||||
"test": "CYPRESS_BASE_URL=https://dev.appsmith.com cypress/test.sh",
|
||||
"test:ci": "CYPRESS_BASE_URL=https://dev.appsmith.com cypress/test.sh --env=ci",
|
||||
"eject": "react-scripts eject",
|
||||
"start-prod": "REACT_APP_ENVIRONMENT=PRODUCTION craco start",
|
||||
"cytest": "REACT_APP_TESTING=TESTING REACT_APP_ENVIRONMENT=DEVELOPMENT craco start & ./node_modules/.bin/cypress open",
|
||||
"test:unit": "$(npm bin)/jest -b --colors --no-cache --silent --coverage --collectCoverage=true --coverageDirectory='../../' --coverageReporters='json-summary'",
|
||||
"test:jest": "$(npm bin)/jest --watch",
|
||||
"generate:widget": "plop --plopfile generators/index.js",
|
||||
"postinstall": "patch-package && CURRENT_SCOPE=client node ../shared/install-dependencies.js",
|
||||
"preinstall": "CURRENT_SCOPE=client node ../shared/build-shared-dep.js",
|
||||
"install": "node cypress/apply-patches.js",
|
||||
"storybook": "yarn workspace @design-system/storybook storybook"
|
||||
},
|
||||
|
||||
"browserslist": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,115 +1,89 @@
|
|||
{
|
||||
"responseMeta":{
|
||||
"status":201,
|
||||
"success":true
|
||||
"responseMeta": {
|
||||
"status": 201,
|
||||
"success": true
|
||||
},
|
||||
"data":{
|
||||
"id":"6065e4b7034ece74b1481819",
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"name":"new workspace",
|
||||
"email":"b1@appsmith.com",
|
||||
"plugins":[
|
||||
"data": {
|
||||
"id": "6065e4b7034ece74b1481819",
|
||||
"userPermissions": [],
|
||||
"name": "new workspace",
|
||||
"email": "b1@appsmith.com",
|
||||
"plugins": [
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5ca385dc81b37f0004b4db85",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5ca385dc81b37f0004b4db85",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5e8dad9bf062d5125ddfd836",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5e8dad9bf062d5125ddfd836",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5ec3bccdd4b5eaa50ba6f583",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5ec3bccdd4b5eaa50ba6f583",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5ec3bcf1d4b5eaa50ba6f593",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5ec3bcf1d4b5eaa50ba6f593",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5f192a44a2d05225d010db9d",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5f192a44a2d05225d010db9d",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5f92f9e9107018510ae540be",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5f92f9e9107018510ae540be",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5f92f9ec107018510ae540c0",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5f92f9ec107018510ae540c0",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5f92f9ef107018510ae540c3",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5f92f9ef107018510ae540c3",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5f92f9f1107018510ae540c5",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5f92f9f1107018510ae540c5",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"5fbcc1c758377818ddaec444",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "5fbcc1c758377818ddaec444",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"60081f50ffab735a9dae84e7",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "60081f50ffab735a9dae84e7",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
},
|
||||
{
|
||||
"userPermissions":[
|
||||
|
||||
],
|
||||
"pluginId":"60374b7d074f9b49cd68a036",
|
||||
"status":"FREE",
|
||||
"new":true
|
||||
"userPermissions": [],
|
||||
"pluginId": "60374b7d074f9b49cd68a036",
|
||||
"status": "FREE",
|
||||
"new": true
|
||||
}
|
||||
],
|
||||
"slug":"new-workspace5",
|
||||
"logoUrl":"/api/v1/assets/null",
|
||||
"new":false
|
||||
"slug": "new-workspace5",
|
||||
"logoUrl": "/api/v1/assets/null",
|
||||
"new": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
|
@ -3,7 +3,6 @@
|
|||
- jsCollection : refers to individual JS Object configs
|
||||
- jsAction : refers to actions derived from functions within a jsCollection
|
||||
|
||||
|
||||
## To do
|
||||
|
||||
- Optimize number of Ast calls
|
||||
- Optimize number of Ast calls
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user