-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
212 lines (172 loc) · 7.48 KB
/
appveyor.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
############
# AppVeyor #
############
# [OVERVIEW] Continuous integration for Windows:
# https://www.appveyor.com/docs/
#
# [INFO] “appveyor.yml” configuration:
# https://www.appveyor.com/docs/appveyor-yml/
# [NOTE] I don’t want support 32-bit Windows:
# https://www.appveyor.com/docs/appveyor-yml/
platform: x64
# [REQUIRED] Visual Studio 2022 for correct LocalAppVeyor run:
# https://ci.appveyor.com/project/Kristinita/kristinitapelican/build/job/5c8lytcray3s6u2k?fullLog=true#L139
# https://www.appveyor.com/docs/custom-build-images/#building-shared-image-in-a-dedicated-project
# https://www.appveyor.com/docs/windows-images-software/#net-framework
#
# [INFO] It the latest AppVeyor image for the February 2022
image: Visual Studio 2022
# [INFO] Don’t download all repository history, that save a time:
# https://www.appveyor.com/docs/how-to/repository-shallow-clone/#setting-depth-of-git-clone-command
clone_depth: 1
init:
# [NOTE] Don’t use SETX for adding value of “PATH” variable!
# You can loss PATH data, if PATH contains more than 1024 symbols:
# https://superuser.com/a/939256/572069
#
# [LEARN] SETX PATH:
# https://stackoverflow.com/a/26947177/5951529
# https://superuser.com/a/939256/572069
#
# [LEARN] SET PATH:
# https://stackoverflow.com/a/9546345/5951529
#
# [BUG] SETX doesn’t work with “configuration” step, compare:
# https://ci.appveyor.com/project/Kristinita/sashaappveyordebugging/builds/22144071
# https://ci.appveyor.com/project/Kristinita/sashaappveyordebugging/builds/22144311
# [LINK] “.travis.yml”:
- SETX PIPENV_IGNORE_VIRTUALENVS 1
- SETX PIPENV_VENV_IN_PROJECT 1
- SETX PIPENV_SKIP_LOCK 1
# [NOTE] Needs AppVeyor console set, see:
# https://stackoverflow.com/a/48093971/5951529
- SETX PYTHONIOENCODING utf-8
# [LINK] “.travis.yml”
- SETX DOTNET_CLI_TELEMETRY_OPTOUT 1
# [LINK] “.travis.yml”
- SETX GRUNT_PYLINT_SKIP_POSTINSTALL yes
# [NOTE] Disable preventing Node.js warnings:
# [LINK] “.travis.yml”
- SETX NODE_NO_WARNINGS 1
# [NOTE] Use “CALL Refreshenv.cmd” for local installation:
# https://github.com/chocolatey/choco/issues/1461#issuecomment-348136706
# https://ss64.com/nt/call.html
# [NOTE] Don’t use refreshenv in AppVeyor, if you use “SET” instead of “pathed”!
# You loss your environment variables:
# https://github.com/appveyor/ci/issues/1755
# Compare (difference — only refreshenv step):
# https://ci.appveyor.com/project/Kristinita/sashaappveyordebugging/builds/22187235
# https://ci.appveyor.com/project/Kristinita/sashaappveyordebugging/builds/22187272
# - refreshenv
# [DECLINED] I disable multi-jobs
###
# [LEARN][APPVEYOR] “configuration” step:
# https://www.appveyor.com/blog/2018/04/25/specialized-build-matrix-configuration-in-appveyor/
# “Debug” configuration is default
# configuration:
# - Debug
# - Release
environment:
# [LEARN][APPVEYOR] Variables:
# https://help.appveyor.com/discussions/problems/4629-how-to-use-appveyor-environment-variable
# https://help.appveyor.com/discussions/questions/15163-multiuple-build-matrix-dimensions-from-environment-variables
#
# [INFO] I use the latest available Python version:
# https://www.appveyor.com/docs/windows-images-software/#python
PYTHON: C:\Python310-x64
# [DECLINED] I disable multi-jobs
###
# [INFO] “grunt default” = “grunt”;
# AppVeyor supports blank value.
#
# [INFO] Spaces before “&&” doesn’t need, compare:
# https://ci.appveyor.com/project/Kristinita/sashatravis/build/job/5oqxucp76bpsr51o
# https://ci.appveyor.com/project/Kristinita/sashatravis/build/1.0.38/job/s52ko615e3fpxr9b
# GRUNT_BUILD:
# [DECLINED] I disable multi-jobs
###
# [NOTE] For AppVeyor I use “clean-console”, not “validatedev”.
# “checkPages” is a task for Travis CI solely;
# for AppVeyor I get bugs, possibly, because HTML not fixed correctly:
# https://ci.appveyor.com/project/Kristinita/kristinitapelican/build/job/o5cwx0ug2htufar8#L2488
# GRUNT_TEST: http-server checkPages&& grunt validate
# [INFO] API key required for LocalAppVeyor:
# https://www.appveyor.com/docs/api/
# https://ci.appveyor.com/api-keys
API_KEY_APPVEYOR:
# [LEARN][APPVEYOR] Secure variables:
# Encrypt in remote AppVeyor site, not locally:
# https://www.appveyor.com/docs/build-configuration/#secure-variables
secure: +tAYCLWvKpNefBmIFHBZzSdFnN8mu71hBU1MqYbrjlY=
# [INFO] API key for PageSpeed Insights:
API_KEY_PAGESPEED_INSIGHTS_V5:
secure: 0xjbRl5LLYt8QPnzOLNdYFmFMT6j97EnU8Jj97BmRRW9FLebRfeUMrqOulXa3gDi
# [LEARN][APPVEYOR] Build configuration:
# https://www.appveyor.com/docs/build-configuration/#build-pipeline
install:
# [REQUIRED] So that script run for “master” branch, not for “HEAD”;
# Needs, that “grunt-checkbranch” works correct:
# https://stackoverflow.com/a/18866140/5951529
#
# [NOTE] It needs in “install” section, because in “init” section actions before cloning.
- git checkout master
# [LEARN][APPVEYOR] Console (cmd.exe) is default terminal in AppVeyor.
# If needs PowerShell, “ps:” required:
# https://www.appveyor.com/docs/appveyor-yml/
#
# [NOTE] For local Scoop installation must required:
# “Set-ExecutionPolicy RemoteSigned -scope CurrentUser”
# http://scoop.sh/
#
# [DEPRECATED] Old Scoop installation method doesn’t work in 2022:
# https://ci.appveyor.com/project/Kristinita/kristinitapelican/build/job/o1iawbsb22eai63l#L26
# [COMPARE] https://ci.appveyor.com/project/Kristinita/sashakristinitaappveyor/builds/44427848
# https://ci.appveyor.com/project/Kristinita/sashakristinitaappveyor/builds/44427890
# - ps: iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
# [INFO] One-line Scoop installation as admin:
# https://github.com/ScoopInstaller/Install#for-admin
- ps: iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
# [NOTE][COMPARE] Required PATH changes to separated file,
# because “PATH” must be set before grunt-pylint installation:
# https://ci.appveyor.com/project/Kristinita/sashagruntdebugging/builds/24778322
# https://ci.appveyor.com/project/Kristinita/sashagruntdebugging/builds/24778353
- '%APPVEYOR_BUILD_FOLDER%/batch/appveyor-pathed.bat'
- refreshenv
# [NOTE] npm parallel doesn’t work, example:
# https://ci.appveyor.com/project/Kristinita/sashapelicantest/build/1.0.25/job/70x5h1qq2d6j8gyp
#
# [NOTE] start command doesn’t work without batch file:
# https://ci.appveyor.com/project/Kristinita/sashapelicantest/build/1.0.31
#
# [LEARN][APPVEYOR] Project folder:
# https://github.com/vim/vim-win32-installer/blob/master/appveyor.yml
- '%APPVEYOR_BUILD_FOLDER%/batch/appveyor-install.bat'
- pathed /APPEND %USERPROFILE%\.dotnet\tools /USER
# [NOTE] 2 “refreshenv” required, if you use pathed instead of “SET”.
#
# [COMPARE] “refreshenv” after install script required:
# https://ci.appveyor.com/project/Kristinita/sashaappveyordebugging/builds/24763413
# https://ci.appveyor.com/project/Kristinita/sashaappveyordebugging/builds/24763463
- refreshenv
# [DECLINED] I disable multi-jobs
###
# [LEARN][APPVEYOR] Simple working configuration:
# https://github.com/Kristinita/SashaAppVeyorDebugging/blob/7ac8c23540c737f403ae280ce6502734833bb85f/appveyor.yml
# for:
# -
# matrix:
# only:
# - configuration: Release
# environment:
# GRUNT_BUILD: publish
# # [NOTE] Travis CI build run parallel and ends earlier than AppVeyor,
# # so “afterdeploy” will run after site deployment.
# GRUNT_TEST: validate remote afterdeploy
build_script:
- grunt
test_script:
- grunt http-server checkPages
- grunt validate
after_test:
- grunt aftertests
- grunt afterdeploy