Skip to content

Commit 665f556

Browse files
committed
(GH-12) Add appveyor configuration file
This commit adds an appveyor configuration file to perform ruby spec and rubocop testing, as well as packging the extension.
1 parent d78c8cd commit 665f556

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

appveyor.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
version: 0.0.4-appv.{build}
2+
branches:
3+
only:
4+
- add-travis-appveyor
5+
- language-server-feature
6+
clone_depth: 10
7+
init:
8+
- SET
9+
10+
environment:
11+
matrix:
12+
# Language Server testing
13+
# LTS Agent
14+
- PUPPET_GEM_VERSION: "~> 4.7.0"
15+
RUBY_VER: 21-x64
16+
RAKE_TASK: test
17+
# Latest 4.x branch
18+
- PUPPET_GEM_VERSION: "~> 4.0"
19+
RUBY_VER: 21-x64
20+
RAKE_TASK: test
21+
# Latest Puppet
22+
- PUPPET_GEM_VERSION: "> 4.0.0"
23+
RUBY_VER: 23-x64
24+
RAKE_TASK: test
25+
# Ruby style
26+
- PUPPET_GEM_VERSION: "> 4.0.0"
27+
RUBY_VER: 23-x64
28+
RAKE_TASK: rubocop
29+
30+
# Extension testing
31+
# Package it up to a VSIX
32+
- nodejs_version: "7.4.0"
33+
nodejs_arch: "x64"
34+
GULP_BUILD_TASK: build
35+
36+
matrix:
37+
fast_finish: true
38+
allow_failures:
39+
# Ruby style
40+
- PUPPET_GEM_VERSION: "> 4.0.0"
41+
RUBY_VER: 23-x64
42+
RAKE_TASK: rubocop
43+
44+
install:
45+
- ps: |
46+
Write-Host "Setting build version..."
47+
$ENV:APPVEYOR_BUILD_VERSION | Out-File -FilePath 'server\lib\puppet-languageserver\VERSION' -Encoding ASCII -Confirm:$false -Force
48+
49+
if ($ENV:RUBY_VER -ne $null) {
50+
Set-Location -Path ".\server"
51+
$ENV:Path = 'C:\Ruby' + $ENV:RUBY_VER + '\bin;' + $ENV:Path
52+
53+
Write-Host "Ruby Version..."
54+
& ruby -v
55+
Write-Host "Gem Version..."
56+
& gem -v
57+
Write-Host "Bundle Version..."
58+
& bundle -v
59+
& bundle install
60+
61+
type Gemfile.lock
62+
}
63+
64+
if ($ENV:nodejs_version -ne $null) {
65+
Install-Product node $env:nodejs_version $env:nodejs_arch
66+
Set-Location -Path ".\client"
67+
68+
Write-Host "Node Version..."
69+
& node --version
70+
71+
Write-Host "Updating npm..."
72+
& npm install -g npm@4 --silent
73+
74+
Write-Host "npm Version..."
75+
& npm --version
76+
77+
Write-Host "Installing modules..."
78+
& npm install --silent
79+
80+
Write-Host "Set the package.json version..."
81+
& node node_modules\gulp\bin\gulp.js bump --version $ENV:APPVEYOR_BUILD_VERSION
82+
}
83+
84+
build_script:
85+
- cmd: IF NOT [%GULP_BUILD_TASK%] == [] node node_modules\gulp\bin\gulp.js %GULP_BUILD_TASK%
86+
87+
test_script:
88+
- cmd: IF NOT [%RAKE_TASK%] == [] bundle exec rake %RAKE_TASK%
89+
- cmd: IF NOT [%NPM_TASK%] == [] npm run %NPM_TASK%
90+
- cmd: IF NOT [%GULP_TASK%] == [] node node_modules\gulp\bin\gulp.js %GULP_TASK%
91+
92+
artifacts:
93+
- path: client/*.vsix

0 commit comments

Comments
 (0)