Skip to content

Commit

Permalink
Merge pull request #11526 from microsoft/main
Browse files Browse the repository at this point in the history
Merge for 1.18.0
  • Loading branch information
sean-mcmanus authored Oct 12, 2023
2 parents a5f8f84 + 7273d61 commit bedcacb
Show file tree
Hide file tree
Showing 284 changed files with 68,682 additions and 52,853 deletions.
9,814 changes: 6,488 additions & 3,326 deletions .github/actions/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.1",
"mocha": "^10.0.0",
"mongodb": "^4.8.1",
"mongodb": "^4.17.0",
"nock": "^13.2.9",
"prettier": "2.7.1",
"ts-node": "^10.9.1",
Expand Down
61 changes: 14 additions & 47 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,14 @@
name: CI (Linux)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Dependencies
run: yarn install
working-directory: Extension

- name: Compile Sources
run: yarn run compile
working-directory: Extension

- name: Run Linter
run: yarn run lint
working-directory: Extension

- name: Compile Test Sources
run: yarn run pretest
working-directory: Extension

- name: Run unit tests
uses: GabrielBB/[email protected]
with:
run: yarn run unitTests
working-directory: Extension

# - name: Run languageServer integration tests
# uses: GabrielBB/[email protected]
# with:
# run: yarn run integrationTests
# working-directory: Extension
name: CI (Linux)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
job:
uses: ./.github/workflows/job-compile-and-test.yml
with:
runner-env: ubuntu-22.04
platform: linux
62 changes: 15 additions & 47 deletions .github/workflows/ci_mac.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,15 @@
name: CI (Mac)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Dependencies
run: yarn install --network-timeout 100000
working-directory: Extension

- name: Compile Sources
run: yarn run compile
working-directory: Extension

- name: Run Linter
run: yarn run lint
working-directory: Extension

- name: Compile Test Sources
run: yarn run pretest
working-directory: Extension

- name: Run unit tests
uses: GabrielBB/[email protected]
with:
run: yarn run unitTests
working-directory: Extension

# - name: Run languageServer integration tests
# uses: GabrielBB/[email protected]
# with:
# run: yarn run integrationTests
# working-directory: Extension
name: CI (Mac)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
job:
uses: ./.github/workflows/job-compile-and-test.yml
with:
runner-env: macos-12
platform: mac
yarn-args: --network-timeout 100000
57 changes: 14 additions & 43 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
name: CI (Windows)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Dependencies
run: yarn install
working-directory: Extension

- name: Compile Sources
run: yarn run compile
working-directory: Extension

- name: Run Linter
run: yarn run lint
working-directory: Extension

- name: Compile Test Sources
run: yarn run pretest
working-directory: Extension

- name: Run unit tests
run: yarn run unitTests
working-directory: Extension

# - name: Run languageServer integration tests
# run: yarn run integrationTests
# working-directory: Extension
name: CI (Windows)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
job:
uses: ./.github/workflows/job-compile-and-test.yml
with:
runner-env: windows-2022
platform: windows
73 changes: 73 additions & 0 deletions .github/workflows/job-compile-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Reuable workflow for compiling and testing extension.
name: Compile and test extension

on:
workflow_call:
inputs:
runner-env:
required: true
type: string
platform:
# Expects 'mac', 'linux', or 'windows'
required: true
type: string
yarn-args:
type: string

jobs:
build:
runs-on: ${{ inputs.runner-env }}

steps:
- uses: actions/checkout@v3

- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Dependencies
run: yarn install ${{ inputs.yarn-args }}
working-directory: Extension

- name: Compile Sources
run: yarn run compile
working-directory: Extension

- name: Run Linter
run: yarn run lint
working-directory: Extension

- name: Run unit tests
run: yarn test
working-directory: Extension

# NOTE : We can't run the test that require the native binary files
# yet -- there will be an update soon that allows the tester to
# acquire them on-the-fly
# - name: Run languageServer integration tests
# if: ${{ inputs.platform == 'windows' }}
# run: yarn test --scenario=SingleRootProject
# working-directory: Extension

# - name: Run E2E IntelliSense features tests
# if: ${{ inputs.platform == 'windows' }}
# run: yarn test --scenario=MultirootDeadlockTest
# working-directory: Extension

# NOTE: For mac/linux run the tests with xvfb-action for UI support.
# Another way to start xvfb https://github.com/microsoft/vscode-test/blob/master/sample/azure-pipelines.yml

# - name: Run languageServer integration tests (xvfb)
# if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
# uses: coactions/setup-xvfb@v1
# with:
# run: yarn test --scenario=SingleRootProject
# working-directory: Extension

# - name: Run E2E IntelliSense features tests (xvfb)
# if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
# uses: coactions/setup-xvfb@v1
# with:
# run: yarn test --scenario=MultirootDeadlockTest
# working-directory: Extension
5 changes: 2 additions & 3 deletions Extension/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*.js
test/**/index.ts
test/**/runTest.ts
tools/prepublish.js

dist/
vscode*.d.ts
16 changes: 13 additions & 3 deletions Extension/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
//"plugin:@typescript-eslint/strict", // I want to enable this. Lots of little changes will happen.
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/strict",
],
"env": {
"browser": true,
Expand All @@ -11,7 +11,7 @@ module.exports = {
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"project": ["tsconfig.json", ".scripts/tsconfig.json"],
"ecmaVersion": 2022,
"sourceType": "module",
"warnOnUnsupportedTypeScriptVersion": false,
Expand Down Expand Up @@ -59,11 +59,17 @@ module.exports = {
}
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extraneous-class": "off",
"no-case-declarations": "off",
"no-useless-escape": "off",
"no-floating-decimal": "error",
"keyword-spacing": ["error", { "before": true, "overrides": { "this": { "before": false } } }],
"arrow-spacing": ["error", { "before": true, "after": true }],
"semi-spacing": ["error", { "before": false, "after": true }],
"no-extra-parens": ["error", "all", { "nestedBinaryExpressions": false, "ternaryOperandBinaryExpressions": false }],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "error",
Expand All @@ -82,6 +88,7 @@ module.exports = {
"@typescript-eslint/unified-signatures": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/space-infix-ops": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
Expand Down Expand Up @@ -110,16 +117,19 @@ module.exports = {
"no-fallthrough": "error",
"no-invalid-this": "error",
"no-irregular-whitespace": "error",
"rest-spread-spacing": ["error", "never"],
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1, "maxBOF": 0 }],
"no-new-wrappers": "error",
"no-return-await": "error",
"no-sequences": "error",
"no-sparse-arrays": "error",
"no-trailing-spaces": "error",
"no-multi-spaces": "error",
"no-undef-init": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"space-before-blocks": "error",
"no-var": "error",
"one-var": [
"error",
Expand Down
1 change: 1 addition & 0 deletions Extension/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ localized_string_ids.h
src/nativeStrings.ts

vscode*.d.ts
.scripts/_*
Loading

0 comments on commit bedcacb

Please sign in to comment.