Skip to content

Commit 2d4d7a2

Browse files
authored
chore(e2e): introduce TSC check (#3442)
1 parent 46ae968 commit 2d4d7a2

File tree

6 files changed

+23
-15
lines changed

6 files changed

+23
-15
lines changed

.github/workflows/e2e-tests-lint.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,30 @@ on:
1313

1414
jobs:
1515
lint:
16-
name: ESLint and Prettier
16+
name: TSC, ESLint and Prettier
1717
runs-on: ubuntu-latest
1818

1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v5
22-
with:
23-
sparse-checkout: |
24-
e2e-tests
25-
.nvmrc
26-
.yarnrc.yml
27-
.yarn
28-
yarn.lock
2922

3023
- name: Set up Node.js
3124
uses: actions/setup-node@v4
3225
with:
3326
node-version-file: ".nvmrc"
3427

35-
- name: Install dependencies
28+
- name: Install dependencies root
29+
working-directory: .
30+
run: yarn install
31+
32+
- name: Install dependencies e2e-tests
3633
working-directory: ./e2e-tests
3734
run: yarn install --mode=skip-build
3835

36+
- name: Run TypeScript Compiler check
37+
working-directory: ./e2e-tests
38+
run: yarn tsc:check
39+
3940
- name: Run ESLint check
4041
working-directory: ./e2e-tests
4142
run: yarn lint:check

docs/dynamic-plugins/debugging.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ Debugger listening on ws://127.0.0.1:9229/9299bb26-3c32-4781-9488-7759b8781db5
2525
```
2626

2727
* The application will be accessible from `http://localhost:7007`. You may start the front end by running the following command from the root directory: `yarn start --filter=app`. It will be available in `http://localhost:3000`
28-
<!-- markdown-link-check-disable -->
28+
<!-- markdown-link-check-disable-next-line -->
2929
* Attach your IDE debugger to the backend process. This step may depend on the IDE that you are using. For example, if you are using VS Code you may want to check [Node.js debugging in VS Code](https://code.visualstudio.com/docs/nodejs/nodejs-debugging)
30-
<!-- markdown-link-check-enable -->
3130
* Add Breakpoints to the files in folder `dynamic-plugins-root/${plugin-id}`. Optionally you can configure your IDE to add the source maps for the plugin so you can debug the TypeScript code directly and not the compiled JavaScript files
3231

3332
## Backend Dynamic Plugins Container Debug

docs/proxy.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ $ GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE='' \
1414
yarn start
1515
```
1616

17+
<!-- markdown-link-check-disable-next-line -->
1718
You can use the command below to quickly start a local corporate proxy server (based on [Squid](https://www.squid-cache.org/)):
1819

1920
```shell
@@ -134,6 +135,7 @@ This approach simulates a corporate proxy environment in a Kubernetes/OpenShift
134135

135136
1. Make sure the network plugin in your Kubernetes cluster supports network policies. [k3d](https://k3d.io) for example supports Network Policies out of the box.
136137

138+
<!-- markdown-link-check-disable-next-line -->
137139
2. Create a separate proxy namespace, and deploy a [Squid](https://www.squid-cache.org/)-based proxy application there. The full URL to access the proxy server from within the cluster would be `http://squid-service.proxy.svc.cluster.local:3128`.
138140

139141
```shell
@@ -271,6 +273,7 @@ spec:
271273

272274
### OpenShift
273275

276+
<!-- markdown-link-check-disable-next-line -->
274277
2. Create a separate proxy project, and deploy a [Squid](https://www.squid-cache.org/)-based proxy application there. The full URL to access the proxy server from within the cluster would be `http://squid-service.proxy.svc.cluster.local:3128`.
275278

276279
```shell

e2e-tests/.lintstagedrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* @type {import('lint-staged').Configuration}
3+
*/
4+
export default {
5+
"*": "yarn prettier:fix",
6+
"*.{js,jsx,ts,tsx,mjs,cjs}": "yarn lint:fix",
7+
"*.{ts,tsx}": () => "yarn tsc:check",
8+
};

e2e-tests/.lintstagedrc.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

e2e-tests/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"lint:fix": "eslint . --ext .js,.ts --fix",
2424
"postinstall": "playwright install chromium",
2525
"tsc": "tsc",
26+
"tsc:check": "tsc -p tsconfig.json",
2627
"prettier:check": "prettier --ignore-unknown --check .",
2728
"prettier:fix": "prettier --ignore-unknown --write ."
2829
},

0 commit comments

Comments
 (0)