-
Notifications
You must be signed in to change notification settings - Fork 351
Migrate core ci to github actions #10133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
timotheeguerin
merged 12 commits into
microsoft:main
from
timotheeguerin:github-actions-core-ci
Mar 27, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d6a8b18
Migrate core ci to github actions
timotheeguerin 696c87d
long paths
timotheeguerin 459d0d8
github action reporter
timotheeguerin b47383e
force no color
timotheeguerin 16296ce
shorter name
timotheeguerin dc10bdf
try ubuntu slim
timotheeguerin 604ce9a
revert ubuntu slim
timotheeguerin 566122b
add final job
timotheeguerin 62888c8
Update CI workflow with permissions and cleanup
timotheeguerin 1c0cddb
format
timotheeguerin 77766aa
Merge branch 'main' into github-actions-core-ci
timotheeguerin 0f2e0e0
Merge branch 'main' into github-actions-core-ci
timotheeguerin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,183 @@ | ||
| name: Core CI | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| # Exclude isolated emitter packages and files already checked by dedicated CI workflows | ||
| paths-ignore: | ||
| - ".prettierignore" | ||
| - ".prettierrc.json" | ||
| - "cspell.yaml" | ||
| - "eslint.config.json" | ||
| - ".chronus/**" | ||
| - "eng/emitters/**" | ||
| - "packages/http-client-csharp/**" | ||
| - "packages/http-client-java/**" | ||
| - "packages/http-client-python/**" | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - "release/*" | ||
| paths-ignore: | ||
| - ".prettierignore" | ||
| - ".prettierrc.json" | ||
| - "cspell.yaml" | ||
| - "eslint.config.json" | ||
| - ".chronus/**" | ||
| - "eng/emitters/**" | ||
| - "packages/http-client-csharp/**" | ||
| - "packages/http-client-java/**" | ||
| - "packages/http-client-python/**" | ||
| merge_group: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build (${{ matrix.os }}, Node ${{ matrix.node-version }}) | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest] | ||
| node-version: ["20.x", "22.x", "24.x"] | ||
|
|
||
| env: | ||
| TYPESPEC_VS_CI_BUILD: true | ||
| TYPESPEC_SKIP_WEBSITE_BUILD: true | ||
|
|
||
| steps: | ||
| - name: Enable git long paths (Windows) | ||
| if: runner.os == 'Windows' | ||
| run: git config --global core.longpaths true | ||
|
|
||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: ./.github/actions/setup | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: 8.0.x | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Restore .NET dependencies | ||
| run: dotnet restore | ||
| working-directory: packages/typespec-vs | ||
|
|
||
| - name: Build | ||
| run: pnpm run build | ||
|
|
||
| - name: Test | ||
| run: pnpm vitest run --coverage --reporter=default --reporter=github-actions | ||
|
|
||
| - name: Upload coverage artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: coverage-${{ matrix.os }}-node${{ matrix.node-version }} | ||
| path: packages/*/coverage/ | ||
| retention-days: 5 | ||
|
|
||
| - name: Check for changed files | ||
| run: node eng/common/scripts/check-for-changed-files.js | ||
|
|
||
| website: | ||
| name: Website | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: ./.github/actions/setup | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Install Playwright browsers | ||
| run: npx playwright install --with-deps | ||
|
|
||
| - name: Build website | ||
| run: pnpm --filter "@typespec/website..." run build | ||
|
|
||
| - name: Check for changed files | ||
| run: node eng/common/scripts/check-for-changed-files.js | ||
|
|
||
| e2e: | ||
|
||
| name: E2E Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| TYPESPEC_VS_CI_BUILD: false | ||
| TYPESPEC_SKIP_WEBSITE_BUILD: true | ||
| DISPLAY: ":99" | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: ./.github/actions/setup | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Install Playwright browsers | ||
| run: | | ||
| sudo dpkg --configure -a | ||
| npx playwright install --with-deps | ||
|
|
||
| - name: Start Xvfb | ||
| run: | | ||
| /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
| echo "Started xvfb" | ||
|
|
||
| - name: Build | ||
| run: pnpm run build | ||
|
|
||
| - name: E2E Tests | ||
| run: pnpm run test:e2e | ||
|
|
||
| - name: Upload UI test results | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: uitestresults-e2e | ||
| path: packages/playground-website/test-results/ | ||
| retention-days: 5 | ||
|
|
||
| - name: Upload screenshots | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: screenshots | ||
| path: packages/typespec-vscode/temp/images-linux/ | ||
| retention-days: 5 | ||
|
|
||
| - name: Upload trace results | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: trace-results | ||
| path: packages/typespec-vscode/test-results/ | ||
| retention-days: 5 | ||
|
|
||
| - name: Check for changed files | ||
| run: node eng/common/scripts/check-for-changed-files.js | ||
|
|
||
| docker: | ||
|
||
| name: Docker Build | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Build Docker image | ||
| run: docker build -f ./docker/Dockerfile . | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.