-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename files to follow yaml file naming conventions (#2607)
* rename files, refactor testing to use templates * read parameter to maxParallel * dry up common template steps * define EnvVars in tests-common.yml * use a storage-specific testing template * move archetype-sdk-tests-storage.yml and dry up tests.yml env vars
- Loading branch information
1 parent
6687005
commit 582d163
Showing
10 changed files
with
229 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
eng/pipelines/templates/jobs/archetype-sdk-tests-browser.yml
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,44 @@ | ||
parameters: | ||
TestType: "browser" | ||
PackageName: "" | ||
EnvVars: [] | ||
MaxParallel: 0 | ||
Matrix: | ||
Linux_Node10X: | ||
OSName: "Linux" | ||
OSVmImage: "ubuntu-16.04" | ||
Windows_Node10X: | ||
OSName: "Windows" | ||
OSVmImage: "vs2017-win2016" | ||
Mac_Node10X: | ||
OSName: "Mac" | ||
OSVmImage: "macOS-10.13" | ||
|
||
jobs: | ||
- job: "Test_Browser" | ||
variables: | ||
- template: ../variables/globals.yml | ||
|
||
strategy: | ||
maxParallel: ${{ parameters.MaxParallel }} | ||
matrix: ${{ parameters.Matrix }} | ||
|
||
pool: | ||
vmImage: "$(OSVmImage)" | ||
|
||
timeoutInMinutes: 240 | ||
|
||
steps: | ||
- template: ../steps/tests-common.yml | ||
parameters: | ||
PackageName: ${{ parameters.PackageName }} | ||
TestType: ${{ parameters.TestType }} | ||
EnvVars: ${{ parameters.EnvVars }} | ||
|
||
- task: PublishTestResults@2 | ||
inputs: | ||
testRunner: JUnit | ||
testResultsFiles: "**/test-results.browser.xml" | ||
testRunTitle: "$(OSName) Node $(NodeVersion) - Browser" | ||
condition: succeededOrFailed() | ||
displayName: "Publish browser test results" |
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,43 @@ | ||
parameters: | ||
TestType: "node" | ||
PackageName: "" | ||
EnvVars: [] | ||
MaxParallel: 0 | ||
Matrix: | ||
Linux_Node10X: | ||
OSName: "Linux" | ||
OSVmImage: "ubuntu-16.04" | ||
Windows_Node10X: | ||
OSName: "Windows" | ||
OSVmImage: "vs2017-win2016" | ||
Mac_Node10X: | ||
OSName: "Mac" | ||
OSVmImage: "macOS-10.13" | ||
|
||
jobs: | ||
- job: "Test_Node" | ||
variables: | ||
- template: ../variables/globals.yml | ||
|
||
strategy: | ||
maxParallel: ${{ parameters.MaxParallel }} | ||
matrix: ${{ parameters.Matrix }} | ||
|
||
pool: | ||
vmImage: "$(OSVmImage)" | ||
|
||
timeoutInMinutes: 240 | ||
|
||
steps: | ||
- template: ../steps/tests-common.yml | ||
parameters: | ||
PackageName: ${{ parameters.PackageName }} | ||
TestType: ${{ parameters.TestType }} | ||
EnvVars: ${{ parameters.EnvVars }} | ||
|
||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFiles: "**/test-results.xml" | ||
testRunTitle: "$(OSName) Node $(NodeVersion) - Node" | ||
condition: succeededOrFailed() | ||
displayName: "Publish node test results" |
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,27 @@ | ||
parameters: | ||
EnvVars: [] | ||
PackageName: "" | ||
TestType: "" | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: "$(NodeVersion)" | ||
displayName: "Install Node.js $(NodeVersion)" | ||
|
||
- script: | | ||
node common/scripts/install-run-rush.js install | ||
displayName: "Install dependencies" | ||
- script: | | ||
node common/scripts/install-run-rush.js build -t "${{parameters.PackageName}}" --verbose | ||
displayName: 'rush build -t "${{parameters.PackageName}}"' | ||
- script: | | ||
node common/scripts/install-run-rush.js build:test -t "${{parameters.PackageName}}" --verbose | ||
displayName: 'rush build:test -t "${{parameters.PackageName}}"' | ||
- script: | | ||
node common/scripts/install-run-rush.js integration-test:${{ parameters.TestType }} -t "${{parameters.PackageName}}" --verbose | ||
displayName: 'rush integration-test:${{ parameters.TestType }} -t "${{parameters.PackageName}}"' | ||
env: ${{ parameters.EnvVars }} |
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,12 @@ | ||
trigger: none | ||
|
||
jobs: | ||
- template: ../../../eng/pipelines/templates/jobs/archetype-sdk-tests-node.yml | ||
parameters: | ||
PackageName: "@azure/event-hubs" | ||
EnvVars: | ||
EVENTHUB_CONNECTION_STRING: $(js-event-hubs-test-connection-string) | ||
EVENTHUB_NAME: $(js-event-hubs-test-name) | ||
IOTHUB_CONNECTION_STRING: $(js-event-hubs-test-iothub-connection-string) | ||
# Event Hubs tests do not support concurrent execution | ||
MaxParallel: 1 |
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,13 @@ | ||
trigger: none | ||
|
||
jobs: | ||
- template: ../../../eng/pipelines/templates/jobs/archetype-sdk-tests-node.yml | ||
parameters: | ||
PackageName: "@azure/event-processor-host" | ||
EnvVars: | ||
EVENTHUB_CONNECTION_STRING: $(js-event-hubs-test-connection-string) | ||
EVENTHUB_NAME: $(js-event-hubs-test-name) | ||
IOTHUB_CONNECTION_STRING: $(js-event-hubs-test-iothub-connection-string) | ||
STORAGE_CONNECTION_STRING: $(js-event-hubs-test-storage-connection-string) | ||
# Event Hubs tests do not support concurrent execution | ||
MaxParallel: 1 |
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,16 @@ | ||
trigger: none | ||
|
||
jobs: | ||
- template: ../../../eng/pipelines/templates/jobs/archetype-sdk-tests-node.yml | ||
parameters: | ||
PackageName: "@azure/service-bus" | ||
EnvVars: | ||
AAD_CLIENT_ID: $(aad-azure-sdk-test-client-id) | ||
AAD_TENANT_ID: $(aad-azure-sdk-test-tenant-id) | ||
AAD_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) | ||
AZURE_SUBSCRIPTION_ID: $(test-subscription-id) | ||
CLEAN_NAMESPACE: "true" | ||
RESOURCE_GROUP: $(service-bus-test-resource-group) | ||
SERVICEBUS_CONNECTION_STRING: $(service-bus-test-connection-string) | ||
# Service Bus tests do not support concurrent execution | ||
MaxParallel: 1 |
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,56 @@ | ||
parameters: | ||
PackageName: "" | ||
EnvVars: | ||
ACCOUNT_NAME: $(js-storage-test-account-name) | ||
ACCOUNT_KEY: $(js-storage-test-account-key) | ||
ACCOUNT_SAS: $(js-storage-test-account-sas) | ||
Matrix: | ||
Linux_Node8X: | ||
OSName: "Linux" | ||
OSVmImage: "ubuntu-16.04" | ||
NodeVersion: "8.x" | ||
Linux_Node10X: | ||
OSName: "Linux" | ||
OSVmImage: "ubuntu-16.04" | ||
NodeVersion: "10.x" | ||
Linux_Node12X: | ||
OSName: "Linux" | ||
OSVmImage: "ubuntu-16.04" | ||
NodeVersion: "12.x" | ||
Windows_Node8X: | ||
OSName: "Windows" | ||
OSVmImage: "vs2017-win2016" | ||
NodeVersion: "8.x" | ||
Windows_Node10X: | ||
OSName: "Windows" | ||
OSVmImage: "vs2017-win2016" | ||
NodeVersion: "10.x" | ||
Windows_Node12X: | ||
OSName: "Windows" | ||
OSVmImage: "vs2017-win2016" | ||
NodeVersion: "12.x" | ||
Mac_Node8X: | ||
OSName: "Mac" | ||
OSVmImage: "macOS-10.13" | ||
NodeVersion: "8.x" | ||
Mac_Node10X: | ||
OSName: "Mac" | ||
OSVmImage: "macOS-10.13" | ||
NodeVersion: "10.x" | ||
Mac_Node12X: | ||
OSName: "Mac" | ||
OSVmImage: "macOS-10.13" | ||
NodeVersion: "12.x" | ||
|
||
jobs: | ||
- template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests-node.yml | ||
parameters: | ||
EnvVars: ${{ parameters.EnvVars }} | ||
PackageName: ${{ parameters.PackageName }} | ||
Matrix: ${{ parameters.Matrix }} | ||
|
||
- template: ../../eng/pipelines/templates/jobs/archetype-sdk-tests-browser.yml | ||
parameters: | ||
EnvVars: ${{ parameters.EnvVars }} | ||
PackageName: ${{ parameters.PackageName }} | ||
Matrix: ${{ parameters.Matrix }} |
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,6 @@ | ||
trigger: none | ||
|
||
jobs: | ||
- template: ../archetype-sdk-tests-storage.yml | ||
parameters: | ||
PackageName: "@azure/storage-blob" |
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,6 @@ | ||
trigger: none | ||
|
||
jobs: | ||
- template: ../archetype-sdk-tests-storage.yml | ||
parameters: | ||
PackageName: "@azure/storage-file" |
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,6 @@ | ||
trigger: none | ||
|
||
jobs: | ||
- template: ../archetype-sdk-tests-storage.yml | ||
parameters: | ||
PackageName: "@azure/storage-queue" |