Skip to content

Commit 3e84f5f

Browse files
committed
temporarily revert release yaml
1 parent 5f6100c commit 3e84f5f

File tree

1 file changed

+60
-23
lines changed

1 file changed

+60
-23
lines changed

eng/pipelines/publish-release.yml

Lines changed: 60 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,86 @@ pool:
77

88
variables:
99
NodeVersion: "14.x"
10-
AutorestTestFolder: "$(Build.SourcesDirectory)/packages/autorest.python/test/"
10+
TestFolder: "$(Build.SourcesDirectory)/packages/autorest.python/test/"
11+
AUTOREST_TESTSERVER_COVERAGE_DIRECTORY: "$(Build.SourcesDirectory)/packages/autorest.python/coverage/"
1112

1213
steps:
13-
- script: npm install -g pnpm
14-
displayName: Install PNPM
14+
- task: NodeTool@0
15+
displayName: "Install Node.js $(NodeVersion)"
16+
inputs:
17+
versionSpec: "$(NodeVersion)"
1518

16-
- script: pnpm install
17-
displayName: Install dependencies
19+
- task: UsePythonVersion@0
20+
displayName: "Use Python 3.7"
21+
inputs:
22+
versionSpec: 3.7
1823

19-
- script: pnpm run build
20-
displayName: Build
24+
- script: |
25+
npm install -g pnpm
26+
npm install -g autorest
27+
pnpm install
28+
pip install -r dev_requirements.txt
29+
displayName: "Prepare Environment for Generation"
30+
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
31+
32+
- script: |
33+
pylint autorest
34+
displayName: "Pylint"
35+
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
36+
37+
- script: |
38+
mypy autorest
39+
displayName: "Mypy"
40+
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
41+
42+
- script: |
43+
pytest test/unittests
44+
displayName: "Unit tests"
45+
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
2146
22-
- script: pip install -r packages/autorest.python/dev_requirements.txt
23-
displayName: Install Autorest Python dev requirements
47+
- script: |
48+
pip install tox coverage==4.5.4
49+
displayName: "Install Env Specific Reqs in Target PyVersion $(PythonVersion)"
2450
25-
- script: pip install -r packages/cadl-python/dev_requirements.txt
26-
displayName: Install Cadl dev requirements
51+
- script: |
52+
cd $(TestFolder)/azure/legacy
53+
tox -e ci
54+
displayName: 'Execute legacy "azure" Tests - Python $(PythonVersion)'
55+
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
2756
2857
- script: |
29-
cd $(AutorestTestFolder)/azure/version-tolerant
58+
cd $(TestFolder)/azure/version-tolerant
3059
tox -e ci
31-
displayName: Execute Autorest Azure Version Tolerant Tests
60+
displayName: 'Execute version tolerant "azure" Tests - Python $(PythonVersion)'
3261
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
3362
3463
- script: |
35-
cd $(AutorestTestFolder)/vanilla/version-tolerant
64+
cd $(TestFolder)/vanilla/legacy
3665
tox -e ci
37-
displayName: Execute Autorest Vanilla Version Tolerant Tests
66+
displayName: 'Execute legacy "vanilla" Tests - Python $(PythonVersion)'
3867
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
3968
4069
- script: |
41-
cd $(AutorestTestFolder)/dpg/version-tolerant
70+
cd $(TestFolder)/vanilla/version-tolerant
4271
tox -e ci
43-
displayName: Execute Autorest DPG Version Tolerant Tests
72+
displayName: 'Execute version tolerant "vanilla" Tests - Python $(PythonVersion)'
4473
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
4574
4675
- script: |
47-
cd test/mock_api_tests
76+
cd $(TestFolder)/dpg/version-tolerant
4877
tox -e ci
49-
displayName: Execute Cadl Tests
50-
workingDirectory: $(Build.SourcesDirectory)/packages/cadl-python/
78+
displayName: 'Execute version tolerant "dpg" Tests - Python $(PythonVersion)'
79+
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
5180
5281
- script: |
53-
pnpm config set //registry.npmjs.org/:_authToken=$(azure-sdk-npm-token)
54-
NPM_AUTH_TOKEN="$(azure-sdk-npm-token)" pnpm -r publish --access public --no-git-checks
55-
displayName: Publish packages
82+
export RELEASE_VERSION=$(node -p -e "require('./package.json').version")
83+
npm pack
84+
npx publish-release --token $(azuresdk-github-pat) --repo autorest.python --owner azure --name "Autorest for Python v$RELEASE_VERSION" --tag v$RELEASE_VERSION --notes='Release version of Autorest for Python v5' --prerelease --editRelease false --assets autorest-python-$RELEASE_VERSION.tgz --target_commitish $(Build.SourceBranchName)
85+
displayName: "Publish GitHub release"
86+
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/
87+
88+
- script: |
89+
echo "//registry.npmjs.org/:_authToken=$(azure-sdk-npm-token)" > ./.npmrc
90+
npm publish --access public
91+
displayName: "Publish to npm"
92+
workingDirectory: $(Build.SourcesDirectory)/packages/autorest.python/

0 commit comments

Comments
 (0)