diff --git a/eng/common/config/area.ts b/eng/common/config/area.ts index 5c302659c37..d66a60b59de 100644 --- a/eng/common/config/area.ts +++ b/eng/common/config/area.ts @@ -48,21 +48,4 @@ export const CIRules = { CSharp: [...all, ...isolatedEmitters, ...AreaPaths["emitter:client:csharp"], ".editorconfig"], Java: [...all, ...isolatedEmitters, ...AreaPaths["emitter:client:java"], ".editorconfig"], Python: [...all, ...isolatedEmitters, ...AreaPaths["emitter:client:python"], ".editorconfig"], - - Core: [ - "**/*", - "!.prettierignore", // Prettier is already run as its dedicated CI(via github action) - "!.prettierrc.json", - "!cspell.yaml", // CSpell is already run as its dedicated CI(via github action) - "!eslint.config.json", // Eslint is already run as its dedicated CI(via github action) - "!.chronus/**/*", // Used across emitters - ...ignore(isolatedEmitters), - ...ignore(AreaPaths["emitter:client:csharp"]), - ...ignore(AreaPaths["emitter:client:java"]), - ...ignore(AreaPaths["emitter:client:python"]), - ], }; - -function ignore(paths: string[]) { - return paths.map((x) => `!${x}`); -} diff --git a/eng/common/pipelines/ci.yml b/eng/common/pipelines/ci.yml index 355fd140509..008fec91a32 100644 --- a/eng/common/pipelines/ci.yml +++ b/eng/common/pipelines/ci.yml @@ -59,9 +59,3 @@ extends: parameters: DependsOn: InitStage Condition: eq('true', stageDependencies.InitStage.outputs['InitJob.InitStep.RunPython']) - - # Run core stages if RunCore == true - - template: /eng/tsp-core/pipelines/stages/ci-stages.yml - parameters: - DependsOn: InitStage - Condition: eq('true', stageDependencies.InitStage.outputs['InitJob.InitStep.RunCore']) diff --git a/eng/common/scripts/utils/find-area-changed.test.ts b/eng/common/scripts/utils/find-area-changed.test.ts index 01ec0bf6f36..8cc44fc782d 100644 --- a/eng/common/scripts/utils/find-area-changed.test.ts +++ b/eng/common/scripts/utils/find-area-changed.test.ts @@ -38,17 +38,6 @@ describe("paths that should trigger python CI", () => { }); }); -describe("paths that should trigger Core CI", () => { - it.each([ - "packages/compiler/package.json", - "packages/http/package.json", - "packages/openapi3/package.json", - ])("%s", (path) => { - const areas = findAreasChanged([path]); - expect(areas).toEqual(["Core"]); - }); -}); - describe("paths that should trigger all isolated packages", () => { it.each([ "eng/emitters/pipelines/templates/jobs/detect-api-changes.yml", @@ -59,22 +48,22 @@ describe("paths that should trigger all isolated packages", () => { }); }); -it("Should return a combination of core and isolated packages", () => { +it("Should return a combination of isolated packages", () => { const areas = findAreasChanged([ "packages/http-client-csharp/src/constants.ts", "packages/http-client-java/src/emitter.ts", "packages/http-client-python/src/emitter.ts", "packages/compiler/package.json", ]); - expect(areas).toEqual(["CSharp", "Java", "Python", "Core"]); + expect(areas).toEqual(["CSharp", "Java", "Python"]); }); -it("Should return CSharp, Core and Java if .editorconfig is changed", () => { +it("Should return CSharp, Java and Python if .editorconfig is changed", () => { const areas = findAreasChanged([".editorconfig"]); - expect(areas).toEqual(["CSharp", "Java", "Python", "Core"]); + expect(areas).toEqual(["CSharp", "Java", "Python"]); }); -it("Should not return Core for .prettierignore, .prettierrc.json, cspell.yaml, eslint.config.json", () => { +it("Should not trigger CI for .prettierignore, .prettierrc.json, cspell.yaml, eslint.config.json alone", () => { const areas = findAreasChanged([ ".prettierignore", ".prettierrc.json", @@ -87,7 +76,7 @@ it("Should not return Core for .prettierignore, .prettierrc.json, cspell.yaml, e expect(areas).toEqual(["CSharp", "Java", "Python"]); }); -it("should return Core for random files at the root", () => { +it("should not trigger any CI for random files at the root", () => { const areas = findAreasChanged(["some.file", "file/in/deep/directory"]); - expect(areas).toEqual(["Core"]); + expect(areas).toEqual([]); }); diff --git a/eng/tsp-core/pipelines/jobs/build-and-test.yml b/eng/tsp-core/pipelines/jobs/build-and-test.yml deleted file mode 100644 index c83a1a92e14..00000000000 --- a/eng/tsp-core/pipelines/jobs/build-and-test.yml +++ /dev/null @@ -1,40 +0,0 @@ -parameters: - - name: nodeVersion - type: string - - name: os - type: string - -steps: - - template: /eng/tsp-core/pipelines/templates/install.yml - parameters: - nodeVersion: ${{ parameters.nodeVersion }} - useDotnet: true - - - template: /eng/tsp-core/pipelines/templates/build.yml - - - script: pnpm run test:ci - displayName: Test - - - template: /eng/tsp-core/pipelines/templates/upload-coverage.yml - - - script: node eng/common/scripts/check-for-changed-files.js - displayName: Check Git Status For Changed Files - - # Unlink node_modules folders to significantly improve performance of subsequent tasks - # which need to walk the directory tree (and are hardcoded to follow symlinks). - - script: pnpm run purge - displayName: "Purge dependencies" - condition: always() - - # It's important for performance to pass "packages" as "searchFolder" to avoid looking under root "node_modules". - # PublishTestResults.searchFolder only supports absolute paths, not relative. - - task: PublishTestResults@2 - inputs: - testResultsFormat: "JUnit" - searchFolder: "$(System.DefaultWorkingDirectory)/packages" - testResultsFiles: "*/test-results.xml" - mergeTestResults: true - failTaskOnFailedTests: true - testRunTitle: "Test os: ${{ parameters.os }}, node: ${{ parameters.nodeVersion }}" - displayName: Publish test results - condition: always() diff --git a/eng/tsp-core/pipelines/jobs/website.yml b/eng/tsp-core/pipelines/jobs/website.yml deleted file mode 100644 index 1756ac1f8c7..00000000000 --- a/eng/tsp-core/pipelines/jobs/website.yml +++ /dev/null @@ -1,11 +0,0 @@ -steps: - - template: /eng/tsp-core/pipelines/templates/install.yml - - - script: pnpm exec playwright install - displayName: Install browsers - - - script: pnpm --filter "@typespec/website..." run build - displayName: Build - - - script: node eng/common/scripts/check-for-changed-files.js - displayName: Check Git Status For Changed Files diff --git a/eng/tsp-core/pipelines/stages/ci-stages.yml b/eng/tsp-core/pipelines/stages/ci-stages.yml deleted file mode 100644 index acd7b0bfa54..00000000000 --- a/eng/tsp-core/pipelines/stages/ci-stages.yml +++ /dev/null @@ -1,78 +0,0 @@ -stages: - - stage: Build_Core - displayName: Core - Build - dependsOn: InitStage - condition: eq('true', stageDependencies.InitStage.outputs['InitJob.InitStep.RunCore']) - variables: - - template: /eng/tsp-core/pipelines/templates/variables/globals.yml@self - jobs: - - job: windows - displayName: Windows - - variables: - TYPESPEC_VS_CI_BUILD: true # Enable official Visual Studio extension build - TYPESPEC_SKIP_WEBSITE_BUILD: true # Disable docusaurus build - - strategy: - matrix: - "Node 22.x": - nodeVersion: 22.x - "Node 24.x": - nodeVersion: "24.x" - - pool: - name: $(WINDOWSPOOL) - image: $(WINDOWSVMIMAGE) - os: windows - - steps: - - template: /eng/tsp-core/pipelines/jobs/build-and-test.yml - parameters: - nodeVersion: $(nodeVersion) - os: linux - - - job: linux - displayName: Linux - - variables: - TYPESPEC_VS_CI_BUILD: true # Enable official Visual Studio extension build - TYPESPEC_SKIP_WEBSITE_BUILD: true # Disable website build - - strategy: - matrix: - "Node 22.x": - nodeVersion: 22.x - "Node 24.x": - nodeVersion: 24.x - - pool: - name: $(LINUXPOOL) - image: $(LINUXVMIMAGE) - os: linux - - steps: - - template: /eng/tsp-core/pipelines/jobs/build-and-test.yml - parameters: - nodeVersion: $(nodeVersion) - os: linux - - - job: website - displayName: Website - pool: - name: $(LINUXPOOL) - image: $(LINUXVMIMAGE) - os: linux - - steps: - - template: /eng/tsp-core/pipelines/jobs/website.yml - - - template: /eng/tsp-core/pipelines/jobs/e2e.yml - - - job: docker_build - pool: - name: $(LINUXPOOL) - image: $(LINUXVMIMAGE) - os: linux - steps: - - script: docker build -f ./docker/Dockerfile . - displayName: Docker build