-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
95 lines (79 loc) · 2.06 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Pipeline for Gatter repository
#
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- develop
pr:
- main
- develop
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
mac:
imageName: 'macOS-latest'
windows:
imageName: 'windows-latest'
pool:
vmImage: $(imageName)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
- script: |
curl -sSL https://install.python-poetry.org | python3 -
displayName: 'Install dependencies'
# Linux & MacOS
- script: |
echo "##vso[task.prependpath]$HOME/.local/bin"
condition: or( eq( variables['Agent.OS'], 'Linux' ), eq( variables['Agent.OS'], 'Darwin' ) )
displayName: 'Add poetry to path on Linux/Mac'
# Windows
- pwsh: |
Write-Host "##vso[task.prependpath]$HOME/AppData/Roaming/Python/Scripts"
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: 'Add poetry to path on Windows'
- script : |
cd backend
poetry install --no-root
displayName: 'Install python dependencies'
- script: |
cd backend
poetry install
poetry run black --check .
poetry run isort --check-only .
displayName: 'Check formatting'
- script: |
cd backend
poetry install
poetry run flake8 .
poetry run mypy .
displayName: 'Check linting'
- script: |
cd backend
poetry install
poetry run coverage erase
poetry run coverage run -m pytest
poetry run coverage report
displayName: 'Tests and coverage'
- task: Npm@1
inputs:
command: install
workingDir: frontend
displayName: 'npm install'
- script: |
cd frontend
npm run ebuild
displayName: 'Build'
- task: CopyFiles@2
inputs:
Contents: |
frontend\dist\gatter Setup 0.1.0.exe
frontend/dist/gatter_0.1.0_amd64.snap
frontend/dist/gatter-0.1.0.dmg
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: drop