microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
6e5f5e24f68cb4e22b7eddde714f7969a1335cd7

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

eng/pipelines/pull-request-common.yml

82lines · modecode

1parameters:
2 - name: nodeVersion
3 type: string
4 - name: poolName
5 type: string
6
7steps:
8 - task: NodeTool@0
9 inputs:
10 versionSpec: ${{ parameters.nodeVersion }}
11 displayName: Install Node.js
12
13 - task: UseDotNet@2
14 inputs:
15 version: 6.0.x
16
17 - script: |
18 echo "Node:"
19 node -v
20 echo "Npm:"
21 npm -v
22 echo "Dotnet:"
23 dotnet --version
24 displayName: "Log tool versions used"
25
26 - script: node common/scripts/install-run-rush.js install
27 displayName: Install JavaScript Dependencies
28
29 - script: dotnet restore
30 displayName: Restore .NET Dependencies
31 workingDirectory: packages/typespec-vs
32
33 - script: node common/scripts/install-run-rush.js rebuild --parallelism max --verbose
34 displayName: Build
35
36 - script: node common/scripts/install-run-rush.js test-official --parallelism max --verbose
37 displayName: Test
38
39 - template: ./upload-coverage.yml
40
41 - script: node common/scripts/install-run-rush.js check-format
42 displayName: Check Formatting
43 condition: ne(variables['Agent.OS'], 'Windows_NT')
44
45 - script: node common/scripts/install-run-rush.js lint --parallelism max --verbose
46 displayName: Lint
47 condition: ne(variables['Agent.OS'], 'Windows_NT')
48
49 - script: node eng/scripts/check-for-changed-files.js
50 displayName: Check Git Status For Changed Files
51
52 - script: node common/scripts/install-run-rush.js cspell
53 displayName: Spell check
54 condition: ne(variables['Agent.OS'], 'Windows_NT')
55
56 - script: node common/scripts/install-run-rush.js e2e
57 displayName: E2E Tests
58
59 # Unlink node_modules folders to significantly improve performance of subsequent tasks
60 # which need to walk the directory tree (and are hardcoded to follow symlinks).
61 - script: node common/scripts/install-run-rush.js purge
62 displayName: "Purge dependencies"
63 continueOnError: true # Some issue with deleting common/temp/rush-recycler folder on linux. This doesn't matter for the next steps.
64 condition: always()
65
66 # It's important for performance to pass "packages" as "searchFolder" to avoid looking under root "node_modules".
67 # PublishTestResults.searchFolder only supports absolute paths, not relative.
68 - task: PublishTestResults@2
69 inputs:
70 testResultsFormat: "JUnit"
71 searchFolder: "$(System.DefaultWorkingDirectory)/packages"
72 testResultsFiles: "*/test-results.xml"
73 mergeTestResults: true
74 failTaskOnFailedTests: true
75 testRunTitle: "Test os: ${{ parameters.poolName }}, node: ${{ parameters.nodeVersion }}"
76 displayName: Publish test results
77 condition: always()
78
79 - publish: ./packages/playground-website/test-results
80 artifact: "uitestresults-${{ parameters.poolName }}-node-${{ parameters.nodeVersion }}"
81 displayName: Publish UI tests artifacts
82 condition: ne(variables['Agent.OS'], 'Windows_NT')
83