forked from wjordan/image_optim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
46 lines (42 loc) · 1.49 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
version: '{build}-{branch}'
install:
- mkdir tmp\bin || exit 0
- set PATH=%cd%\tmp\bin;%PATH%
- ruby --version
- bundle package --all
- ps: git --work-tree=tmp\bin checkout origin/windows-binaries -- '*.exe'
- ps: | # svgo
npm install -g svgo
- ps: | # ImageMagick
if ((-not (test-path tmp/bin/convert.exe)) -or (-not (test-path tmp/bin/compare.exe)) -or (-not (test-path tmp/bin/magic.xml))) {
choco install -y imagemagick.tool
cp C:\ProgramData\chocolatey\lib\imagemagick.tool\tools\convert.exe tmp\bin
cp C:\ProgramData\chocolatey\lib\imagemagick.tool\tools\compare.exe tmp\bin
cp C:\ProgramData\chocolatey\lib\imagemagick.tool\tools\magic.xml tmp\bin
}
- bundle exec image_optim --info --allow-lossy --no-pack
cache:
- tmp/bin
build: off
test_script:
- ps: |
$path = $env:Path
$rubypaths = ls -Path C:\Ruby*\bin
foreach ($rubypath in $rubypaths[-2, -1]) {
echo "################################################################################"
$env:Path = "$rubypath;" + $path
ruby --version
bundle package --all
bundle install --local -j4
bundle exec rspec
if ($LASTEXITCODE -gt 0) {
exit 1
}
rm tmp/optimize_test -recurse -force
cp spec/images tmp/optimize_test -recurse -force
bundle exec image_optim --allow-lossy -r tmp/optimize_test
if ($LASTEXITCODE -gt 0) {
exit 1
}
}
$env:Path = $path