forked from GamesDoneQuick/donation-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
132 lines (110 loc) · 3.4 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: tracker_backend_tests
dependsOn: []
displayName: Tracker Backend
strategy:
matrix:
Latest:
PYTHON_VERSION: '3.10'
DJANGO_VERSION: '3.2'
Oldest:
PYTHON_VERSION: '3.7'
DJANGO_VERSION: '2.2'
Django22:
PYTHON_VERSION: '3.9'
DJANGO_VERSION: '2.2'
Python37:
PYTHON_VERSION: '3.7'
DJANGO_VERSION: '3.2'
Python38:
PYTHON_VERSION: '3.8'
DJANGO_VERSION: '3.2'
Python39:
PYTHON_VERSION: '3.9'
DJANGO_VERSION: '3.2'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(PYTHON_VERSION)'
architecture: 'x64'
- task: CacheBeta@1
inputs:
key: pip | $(Agent.OS) | "$(DJANGO_VERSION)" | tests/requirements.txt | setup.py
path: $(Pipeline.Workspace)/../../.cache/pip
displayName: 'Cache pip'
- task: CacheBeta@1
inputs:
key: yarn | $(Agent.OS) | production | yarn.lock
path: $(Build.SourcesDirectory)/node_modules
displayName: 'Cache yarn'
- script: |
python -m pip install --upgrade pip setuptools wheel
displayName: 'Install Python base packages'
- script: |
pip install . -r tests/requirements.txt django~=$(DJANGO_VERSION)
displayName: 'Install Python prerequisites'
- script: |
python check_migrations.py
displayName: 'Check for bad or missing migrations'
- script: |
python runtests.py --parallel --no-input
displayName: 'Run Django tests'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/TEST-*.xml'
testRunTitle: 'Python $(PYTHON_VERSION)'
condition: succeededOrFailed()
- job: build_package
displayName: Tracker Package
steps:
- task: CacheBeta@1
inputs:
key: pip | $(Agent.OS) | setup.py
path: $(Pipeline.Workspace)/../../.cache/pip
displayName: 'Cache pip'
- task: CacheBeta@1
inputs:
key: yarn | $(Agent.OS) | production | yarn.lock
path: $(Build.SourcesDirectory)/node_modules
displayName: 'Cache yarn'
- script: |
python -m pip install --upgrade pip setuptools wheel
python setup.py package
displayName: 'Build Package'
- job: tracker_frontend_tests
dependsOn: []
displayName: Tracker Frontend
continueOnError: true
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
strategy:
matrix:
Node14:
NODE_VERSION: 14
Node16:
NODE_VERSION: 16
steps:
- task: NodeTool@0
inputs:
versionSpec: '$(NODE_VERSION)'
- task: Cache@2
inputs:
key: yarn | $(Agent.OS) | "$(NODE_VERSION)" | development | yarn.lock
path: $(YARN_CACHE_FOLDER)
displayName: 'Cache yarn'
- script: yarn --frozen-lockfile
displayName: 'yarn install'
- script: yarn build
displayName: 'build'
- script: yarn prettier
displayName: 'Formatting (prettier)'
- script: yarn tsc
displayName: 'Typechecking (typescript)'
- script: yarn lint
displayName: 'Linting (eslint)'
- script: yarn test
displayName: 'tests (Karma)'