Skip to content

Commit

Permalink
Merge branch 'main' into eslint-plugin-tsv
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeharder committed Jan 21, 2025
2 parents bcc439e + ae09132 commit 83267e7
Show file tree
Hide file tree
Showing 1,736 changed files with 154,013 additions and 16,072 deletions.
6 changes: 6 additions & 0 deletions .github/cspell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '0.2'
import:
- ../cspell.yaml
words:
- azsdk
- pwsh
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ updates:
typespec-client-generator-cli:
patterns:
- "@azure-tools/typespec-client-generator-cli"
# Ships separately from other typespec packages
openapi-to-typespec:
patterns:
- "@autorest/openapi-to-typespec"
typespec:
patterns:
- "*typespec*"
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/SDK-Suppressions-Label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
- main
- RPSaaSMaster
- release*

jobs:
process-sdk-suppressions-labels:
name: Sdk Suppressions
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
Expand All @@ -29,8 +29,11 @@ jobs:
run: |
. eng/scripts/ChangedFiles-Functions.ps1
$changedFiles = @(Get-ChangedFiles)
echo "PR Changed files: $changedFiles"
Add-Content -Path $env:GITHUB_OUTPUT -Value "changedFiles=$changedFiles"
$changedFilesArray = $changedFiles -split ' '
$yamlFilesArray = $changedFilesArray | Where-Object { $_ -match 'sdk-suppressions\.yaml$' }
$yamlFiles = $yamlFilesArray -join ' '
echo "PR Changed sdk-suppressions.yaml files: $yamlFiles"
Add-Content -Path $env:GITHUB_OUTPUT -Value "changedFiles=$yamlFiles"
- name: Get GitHub PullRequest Context
uses: actions/github-script@v7
Expand All @@ -53,7 +56,7 @@ jobs:
GITHUB_PULL_REQUEST_LABELS: ${{ steps.fetch-pullRequest-context.outputs.prLabels }}
run: |
node eng/tools/sdk-suppressions/cmd/sdk-suppressions-label.js HEAD^ HEAD "$GITHUB_PULL_REQUEST_CHANGE_FILES" "$GITHUB_PULL_REQUEST_LABELS"
OUTPUT=$(cat $OUTPUT_FILE)
echo "Script output labels: $OUTPUT"
Expand All @@ -71,7 +74,7 @@ jobs:
done
# No Action or Add/Remove label ​​according to step run-suppressions-script output
# e.g.
# e.g.
# If the output of the step does not include the BreakingChange-Go-Sdk-Suppression, no action will be taken.
# If the step's output is "BreakingChange-Go-Sdk-Suppression='true'", the label "BreakingChange-Go-Sdk-Suppression" will be applied to the PR.
# If the step's output is "BreakingChange-Go-Sdk-Suppression='false'", the label "BreakingChange-Go-Sdk-Suppression" will be removed from the PR.
Expand All @@ -81,21 +84,21 @@ jobs:
with:
name: "BreakingChange-Go-Sdk-Suppression"
value: "${{ steps.run-suppressions-script.outputs.BreakingChange-Go-Sdk-Suppression == 'true' }}"

- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results java
if: ${{ steps.run-suppressions-script.outputs.BreakingChange-Java-Sdk-Suppression }}
with:
name: "BreakingChange-Java-Sdk-Suppression"
value: "${{ steps.run-suppressions-script.outputs.BreakingChange-Java-Sdk-Suppression == 'true' }}"

- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results js
if: ${{ steps.run-suppressions-script.outputs.BreakingChange-JavaScript-Sdk-Suppression }}
with:
name: "BreakingChange-JavaScript-Sdk-Suppression"
value: "${{ steps.run-suppressions-script.outputs.BreakingChange-JavaScript-Sdk-Suppression == 'true' }}"

- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results python
if: ${{ steps.run-suppressions-script.outputs.BreakingChange-Python-Sdk-Suppression }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/_reusable-eng-tools-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu, windows]
node-version: [18, 22]
exclude:
- os: ubuntu-latest
- os: ubuntu
node-version: 22
- os: windows-latest
- os: windows
node-version: 18

runs-on: ${{ matrix.os }}
runs-on: ${{ fromJSON('{"ubuntu":"ubuntu-24.04", "windows":"windows-2022"}')[matrix.os] }}

steps:
- if: runner.os == 'Windows'
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- run: npm run prettier
if: inputs.prettier == true
shell: pwsh
working-directory: ./eng/tools/${{ inputs.package }}
working-directory: ./eng/tools/${{ inputs.package }}

- run: npm run test:ci
shell: pwsh
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/protected-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
protected-files:
name: Protected Files

runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
# Since check is required, the job must pass instead of being skipped
Expand All @@ -29,9 +29,10 @@ jobs:
run: |
. eng/scripts/ChangedFiles-Functions.ps1
$protectedFiles = @("package.json", "package-lock.json")
$protectedFiles = @("cspell.json", "cspell.yaml", "package.json", "package-lock.json", ".github/*", "eng/*")
$changedFiles = @(Get-ChangedFiles -baseCommitish HEAD^ -targetCommitish HEAD -diffFilter "")
$matchedFiles = @($protectedFiles | Where-Object { $changedFiles -contains $_})
$matchedFiles = @($changedFiles | Where-Object { $changedFile = $_; $protectedFiles | Where-Object { $changedFile -like $_ } })
if ($matchedFiles.Count -gt 0) {
foreach ($file in $matchedFiles) {
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/spelling-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: SpellCheck - All

on:
push:
branches:
- main
- RPSaaSMaster

schedule:
# Run every day at 12:06 UTC
- cron: "6 12 * * *"
workflow_dispatch:

jobs:
spellcheck:
name: SpellCheck
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run spelling check
run: |
./eng/common/spelling/Invoke-Cspell.ps1 `
-ScanGlobs '**' `
-CSpellConfigPath './cspell.json' `
-SpellCheckRoot (Resolve-Path specification)
shell: pwsh
5 changes: 3 additions & 2 deletions .github/workflows/spelling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: pull_request
jobs:
spellcheck:
name: SpellCheck
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout repository
Expand All @@ -16,9 +16,10 @@ jobs:
- name: Run spelling check
run: |
./eng/common/scripts/check-spelling-in-changed-files.ps1 `
-CSpellConfigPath 'cSpell.json' `
-CSpellConfigPath 'cspell.json' `
-SourceCommittish HEAD `
-TargetCommittish HEAD^ `
-SpellCheckRoot (Resolve-Path specification) `
-ExitWithError
if ($LASTEXITCODE) {
Write-Host "Spelling errors found in changed files. See https://aka.ms/ci-fix#spell-check"
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/tsp-client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ on:
- eng/tools/tsconfig.json
- eng/tools/tsp-client-tests/**
- specification/common-types
- specification/keyvault
- specification/sphere
- specification/contosowidgetmanager
workflow_dispatch:

jobs:
Expand All @@ -28,5 +27,4 @@ jobs:
package: tsp-client-tests
sparse-checkout-paths: |
specification/common-types
specification/keyvault
specification/sphere
specification/contosowidgetmanager
45 changes: 22 additions & 23 deletions .github/workflows/typespec-requirement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,27 @@ jobs:
TypeSpec-Requirement:
name: TypeSpec Requirement

runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
with:
# Required since "HEAD^" is passed to TypeSpec-Requirement.ps1
fetch-depth: 2

- name: Setup Node and run `npm ci`
uses: ./.github/actions/setup-node-npm-ci

- run: |
eng/scripts/TypeSpec-Requirement.ps1 `
-BaseCommitish HEAD^ `
-TargetCommitish HEAD `
id: tsr-ps1
shell: pwsh
# Always add label artifact, even if "brownfield=false", to ensure label is removed when necessary
- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results
with:
name: "brownfield"
value: "${{ steps.tsr-ps1.outputs.brownfield == 'true' }}"

- uses: actions/checkout@v4
with:
# Required since "HEAD^" is passed to TypeSpec-Requirement.ps1
fetch-depth: 2

- name: Setup Node and run `npm ci`
uses: ./.github/actions/setup-node-npm-ci

- run: |
eng/scripts/TypeSpec-Requirement.ps1 `
-BaseCommitish HEAD^ `
-TargetCommitish HEAD `
id: tsr-ps1
shell: pwsh
# Always add label artifact, even if "brownfield=false", to ensure label is removed when necessary
- uses: ./.github/actions/add-label-artifact
name: Upload artifact with results
with:
name: "brownfield"
value: "${{ steps.tsr-ps1.outputs.brownfield == 'true' }}"
6 changes: 3 additions & 3 deletions .github/workflows/typespec-validation-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:

schedule:
# Run 4x/day
- cron: '0 0,6,12,18 * * *'
- cron: "0 0,6,12,18 * * *"

workflow_dispatch:

Expand All @@ -53,7 +53,7 @@ jobs:
# total-shards must be an accurate count of the number of shards
total-shards: [3]

runs-on: ${{ matrix.os }}-latest
runs-on: ${{ fromJSON('{"ubuntu":"ubuntu-24.04", "windows":"windows-2022"}')[matrix.os] }}

steps:
- name: Enable git long paths
Expand All @@ -67,7 +67,7 @@ jobs:

- name: Setup Node 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
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/typespec-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ on: pull_request
jobs:
typespec-validation:
name: TypeSpec Validation
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Node and run `npm ci`
uses: ./.github/actions/setup-node-npm-ci
- name: Setup Node 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'
- 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
./eng/scripts/TypeSpec-Validation.ps1 -GitClean -Verbose
shell: pwsh
24 changes: 12 additions & 12 deletions .github/workflows/update-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ jobs:
contents: read
pull-requests: write

runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github
- name: Update Labels
uses: ./.github/actions/update-labels
with:
owner: ${{ inputs.owner }}
repo: ${{ inputs.repo }}
issue_number: ${{ inputs.issue_number }}
run_id: ${{ inputs.run_id }}
- name: Update Labels
uses: ./.github/actions/update-labels
with:
owner: ${{ inputs.owner }}
repo: ${{ inputs.repo }}
issue_number: ${{ inputs.issue_number }}
run_id: ${{ inputs.run_id }}
Loading

0 comments on commit 83267e7

Please sign in to comment.