forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,262 changed files
with
370,849 additions
and
11,846 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains 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
This file contains 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,22 @@ | ||
name: Setup Node 20 and run `npm ci` | ||
description: Uses specified Node version and runs npm commands to set up the environment for REST API CI | ||
|
||
inputs: | ||
node-version: | ||
description: 'Node version to use' | ||
default: 20.x | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
|
||
- run: npm ci | ||
shell: bash | ||
|
||
- run: npm ls -a | ||
shell: bash | ||
continue-on-error: true |
This file contains 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,78 @@ | ||
name: TypeSpec Validation - All | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- RPSaaSMaster | ||
- typespec-next | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
- RPSaaSMaster | ||
- typespec-next | ||
paths: | ||
- .gitattributes | ||
- .prettierrc.json | ||
- package-lock.json | ||
- package.json | ||
- tsconfig.json | ||
- eng/** | ||
- specification/suppressions.yaml | ||
- specification/common-types/** | ||
|
||
# Workflow and workflow dependencies | ||
- .github/workflows/typespec-validation-all.yaml | ||
- .github/actions/setup-node-npm-ci/** | ||
|
||
schedule: | ||
# Run 4x/day | ||
- cron: '0 0,6,12,18 * * *' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
typespec-validation-all: | ||
name: TypeSpec Validation All | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
# shards must start at 0 and increment by 1 | ||
shard: [0, 1, 2] | ||
# total-shards must be an accurate count of the number of shards | ||
total-shards: [3] | ||
# When triggered by schedule, validate both the default branch and typespec-next | ||
# Use the placeholder string "default" instead of passing "" directly, since the latter gets ignored by | ||
# the GitHub Jobs UI. | ||
ref: ${{ fromJSON(github.event_name == 'schedule' && '["default", "typespec-next"]' || '["default"]') }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Enable git long paths | ||
if: runner.os == 'Windows' | ||
run: git config --global core.longpaths true | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
# Convert placeholder string 'default' to '', which tells the action to checkout the default ref. | ||
ref: ${{ matrix.ref != 'default' && matrix.ref || '' }} | ||
|
||
- name: Setup Node 20 and run `npm ci` | ||
uses: ./.github/actions/setup-node-npm-ci | ||
|
||
- name: Validate All Specs | ||
run: | | ||
# Keep processing when errors are written. Nonzero exit will mark the | ||
# step as failed. | ||
$ErrorActionPreference = 'Continue' | ||
./eng/scripts/TypeSpec-Validation.ps1 ` | ||
-Shard ${{ matrix.shard }} ` | ||
-TotalShards ${{ matrix.total-shards }} ` | ||
-CheckAll ` | ||
-GitClean ` | ||
-Verbose | ||
shell: pwsh |
This file contains 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,25 @@ | ||
name: TypeSpec Validation | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
typespec-validation: | ||
name: TypeSpec Validation | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Setup Node 20 and run `npm ci` | ||
uses: ./.github/actions/setup-node-npm-ci | ||
|
||
- name: Validate Impacted Specs | ||
run: | | ||
# Keep processing when errors are written. Nonzero exit will mark the | ||
# step as failed. | ||
$ErrorActionPreference = 'Continue' | ||
./eng/scripts/TypeSpec-Validation.ps1 -GitClean -Verbose | ||
shell: pwsh |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,3 @@ | ||
# Common Engineering System | ||
|
||
Updates under this directory should only be made in the `azure-sdk-tools` repo as any changes under this directory outside of that repo will end up getting overwritten with future updates. For information about making updates see [common engineering system docs](https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md) |
This file contains 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,17 @@ | ||
@echo off | ||
|
||
REM Copyright (c) Microsoft Corporation. All rights reserved. | ||
REM Licensed under the MIT License. | ||
|
||
setlocal | ||
|
||
for /f "usebackq delims=" %%i in (`where pwsh 2^>nul`) do ( | ||
set _cmd=%%i | ||
) | ||
|
||
if "%_cmd%"=="" ( | ||
echo Error: PowerShell not found. Please visit https://github.com/powershell/powershell for install instructions. | ||
exit /b 2 | ||
) | ||
|
||
call "%_cmd%" -NoLogo -NoProfile -File "%~dpn0.ps1" %* |
Oops, something went wrong.