|
| 1 | +# Python application example with ActiveState Platform |
| 2 | +trigger: |
| 3 | +- activestate-platform-and-state-tool-setup |
| 4 | +jobs: |
| 5 | +- job: Linux |
| 6 | + pool: |
| 7 | + vmImage: 'ubuntu-latest' |
| 8 | + steps: |
| 9 | + - script: sh <(curl -q https://platform.activestate.com/dl/cli/install.sh) -n |
| 10 | + displayName: 'Install State Tool' |
| 11 | + - script: state deploy shnewto/learn-python |
| 12 | + displayName: 'Deploy project' |
| 13 | + - script: pylint src |
| 14 | + displayName: 'Lint with pylint' |
| 15 | + - script: flake8 src --statistics --count |
| 16 | + displayName: 'Lint with flake8' |
| 17 | + - script: pytest |
| 18 | + displayName: 'Test with pytest' |
| 19 | +- job: macOS |
| 20 | + pool: |
| 21 | + vmImage: 'macOS-latest' |
| 22 | + steps: |
| 23 | + - script: sh <(curl -q https://platform.activestate.com/dl/cli/install.sh) -n |
| 24 | + displayName: 'Install State Tool' |
| 25 | + - script: state deploy --force shnewto/learn-python |
| 26 | + displayName: 'Deploy project' |
| 27 | + - script: pylint src |
| 28 | + displayName: 'Lint with pylint' |
| 29 | + - script: flake8 src --statistics --count |
| 30 | + displayName: 'Lint with flake8' |
| 31 | + - script: pytest |
| 32 | + displayName: 'Test with pytest' |
| 33 | +- job: Windows |
| 34 | + pool: |
| 35 | + vmImage: 'windows-latest' |
| 36 | + steps: |
| 37 | + - powershell: | |
| 38 | + (New-Object Net.WebClient).DownloadFile('https://platform.activestate.com/dl/cli/install.ps1', 'install.ps1') |
| 39 | + Invoke-Expression -Command "$env:PIPELINE_WORKSPACE\install.ps1 -n -t $env:AGENT_TOOLSDIRECTORY/bin" |
| 40 | + Write-Host "##vso[task.prependpath]$env:AGENT_TOOLSDIRECTORY\bin" |
| 41 | + workingDirectory: $(Pipeline.Workspace) |
| 42 | + displayName: 'Install State Tool' |
| 43 | + - script: | |
| 44 | + state deploy shnewto/learn-python --path %AGENT_TEMPDIRECTORY% |
| 45 | + echo ##vso[task.prependpath]%AGENT_TEMPDIRECTORY%\bin |
| 46 | + echo ##vso[task.setvariable variable=PATHEXT]%PATHEXT%;.LNK |
| 47 | + displayName: 'Deploy project' |
| 48 | + - script: pylint src |
| 49 | + displayName: 'Lint with pylint' |
| 50 | + - script: flake8 src --statistics --count |
| 51 | + displayName: 'Lint with flake8' |
| 52 | + - script: pytest |
| 53 | + displayName: 'Test with pytest' |
0 commit comments