From 5e98c1d246b2ce86ec0d33d6370f484ef79ac882 Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Tue, 19 Nov 2024 13:04:27 +0800 Subject: [PATCH 1/5] Create test-sdk.yml --- .github/workflows/test-sdk.yml | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/test-sdk.yml diff --git a/.github/workflows/test-sdk.yml b/.github/workflows/test-sdk.yml new file mode 100644 index 0000000000..7116a112e6 --- /dev/null +++ b/.github/workflows/test-sdk.yml @@ -0,0 +1,42 @@ +name: pr-check + +on: + pull_request: + branches: + - main +jobs: + pr-check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Node.js 18 + uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install autorest & rush + run: | + npm install -g "autorest" + npm install -g @microsoft/rush@5.63.1 + - name: Rush sync-versions + run: | + rush sync-versions + - name: Rush Update + run: | + rush update + - name: Rush Rebuild + run: | + rush rebuild + - name: Verify SDK generator + shell: pwsh + working-directory: tests-upgrade/tests-sdk1-support + run: | + ./AutoRestSupportSdkTest.ps1 -AllowList -SkipCsharp + - name: Save artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: CompareResult + path: tests-upgrade/tests-sdk1-support/CompareResult + if-no-files-found: warn + retention-days: 7 From 830217aa0417084dad2eb3b522f73204dfa0b95c Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Tue, 19 Nov 2024 13:56:35 +0800 Subject: [PATCH 2/5] Rename the action job --- .github/workflows/test-sdk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-sdk.yml b/.github/workflows/test-sdk.yml index 7116a112e6..0efc044458 100644 --- a/.github/workflows/test-sdk.yml +++ b/.github/workflows/test-sdk.yml @@ -1,4 +1,4 @@ -name: pr-check +name: test-sdk on: pull_request: From 184cceb628f0d2240b68c7147e9a4e6783558a47 Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Tue, 19 Nov 2024 13:57:52 +0800 Subject: [PATCH 3/5] Rename the job --- .github/workflows/test-sdk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-sdk.yml b/.github/workflows/test-sdk.yml index 0efc044458..3059934cb2 100644 --- a/.github/workflows/test-sdk.yml +++ b/.github/workflows/test-sdk.yml @@ -5,7 +5,7 @@ on: branches: - main jobs: - pr-check: + test-sdk: runs-on: ubuntu-latest steps: - name: Checkout From 2506f6ed0fca3c58a9fb1b8f12f193e48713de78 Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Tue, 19 Nov 2024 14:06:17 +0800 Subject: [PATCH 4/5] Create test-emitter.yml --- .github/workflows/test-emitter.yml | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/test-emitter.yml diff --git a/.github/workflows/test-emitter.yml b/.github/workflows/test-emitter.yml new file mode 100644 index 0000000000..78730e6c8b --- /dev/null +++ b/.github/workflows/test-emitter.yml @@ -0,0 +1,46 @@ +name: test-emitter + +on: + pull_request: + branches: + - main +jobs: + test-emitter: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Node.js 18 + uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install typespec & rush + run: | + npm install -g "@typespec/compiler" + npm install -g @microsoft/rush@5.63.1 + - name: Rush sync-versions + run: | + rush sync-versions + - name: Rush Update + run: | + rush update + - name: Rush Rebuild + run: | + rush rebuild + - name: Run npm install in tests-emitter + working-directory: tests-upgrade/tests-emitter + run: | + npm install + - name: Verify Typespec emitter + shell: pwsh + working-directory: tests-upgrade/tests-emitter + run: | + ./EmitterTest.ps1 -AllowList -SaveResult + - name: Save artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: CompareResult + path: tests-upgrade/tests-emitter/CompareResult + if-no-files-found: warn + retention-days: 7 From 2180f8830a8ecb9fcc293f0c61ba92abe8d5cc75 Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Tue, 19 Nov 2024 14:17:15 +0800 Subject: [PATCH 5/5] Update test-emitter.yml --- .github/workflows/test-emitter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-emitter.yml b/.github/workflows/test-emitter.yml index 78730e6c8b..680ec8e3ce 100644 --- a/.github/workflows/test-emitter.yml +++ b/.github/workflows/test-emitter.yml @@ -6,7 +6,7 @@ on: - main jobs: test-emitter: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4