forked from thatsIch/sublime-rainmeter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
115 lines (89 loc) · 4.73 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
environment:
global:
# The package name
PACKAGE: "Rainmeter"
SUBLIME_TEXT_VERSION : "3"
matrix:
fast_finish: true
allow_failures:
- platform: x86
- platform: x64
# enable for debugging purposes
# init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
# check versions for curling
# - curl --version
# - grep --version
# - head --version
# - cut --version
# - xargs --version
# check github API status
# - curl -i https://api.github.com/repos/rainmeter/rainmeter/releases
# install rainmeter
# we use the github API to determine the latest rainmeter
# we assume that the first entry is the latest
# using the API and /releases/latest only results in releases and not pre-releases
# rainmeter is typically offered as a pre-release
# requests all releases from rainmeter | search for field bdu | first entry| easier delimiter | 4th col without * | pass url to curl -L to follow redirect
# - curl -s https://api.github.com/repos/rainmeter/rainmeter/releases
# - curl -s https://api.github.com/repos/rainmeter/rainmeter/releases | grep browser_download_url
# - curl -s https://api.github.com/repos/rainmeter/rainmeter/releases | grep browser_download_url | head -n 1
# - curl -s https://api.github.com/repos/rainmeter/rainmeter/releases | grep browser_download_url | head -n 1 | sed -e "s/""/*/g"
# - curl -s https://api.github.com/repos/rainmeter/rainmeter/releases | grep browser_download_url | head -n 1 | sed -e "s/""/*/g" | cut --delimiter="*" -f 4
- 'curl -s -H "Authorization: token %GITHUB_ACCESS_TOKEN%" https://api.github.com/repos/rainmeter/rainmeter/releases | grep browser_download_url | head -n 1 | sed -e "s/""/*/g" | cut --delimiter="*" -f 4 | xargs curl -o C:\rainmeter-setup.exe -L'
# the project is installed into C:\projects\sublime-rainmeter via AppVeyor
# the installer is located in the tests folder since this is used for integration testing
# this will silently install rainmeter
# we do not need to handle UAC since it is disabled in workers
- C:\projects\sublime-rainmeter\tests\rainmeter-installer.exe
# we download the special test environment for sublime text which can run commands from within the VM
- ps: appveyor DownloadFile "https://raw.githubusercontent.com/randy3k/UnitTesting/master/sbin/appveyor.ps1"
- ps: .\appveyor.ps1 "bootstrap" -verbose
# install Package Control
- ps: .\appveyor.ps1 "install_package_control" -verbose
build: off
test_script:
- ps: .\appveyor.ps1 "run_tests" -coverage -verbose
# testing syntax_test files
# - ps: .\appveyor.ps1 "run_syntax_tests" -verbose
after_test:
# upgrade to latest pip first
- python -m pip install --upgrade pip
- pip install coveralls
# check if actually copied
- coverage report
# set via AppVeyor environment token for privacy
# or use encrypted versions and decrypt it here
# - bat: set COVERALLS_REPO_TOKEN=XXXX
# coveralls generally requires the .coverage file to be in the root folder
# this is already copied for us from the "%appdata%\Roaming\Sublime Text 3\Packages\User\UnitTesting\Rainmeter\coverage" folder
# - bat: copy "%appdata%\Roaming\Sublime Text 3\Packages\User\UnitTesting\Rainmeter\coverage" .coverage
- coveralls
# additional support for codacy
- pip install codacy-coverage
# To generate the required coverage XML file, calculate coverage for your project as normal, by running:
- coverage xml
# Next, simply run the Codacy reporter. It will find the current commit and send all details to your project dashboard:
- python-codacy-coverage -r coverage.xml
# additional support for codeclimate
- pip install codeclimate-test-reporter==0.2.1
- codeclimate-test-reporter
# additional support for codecov
# no token required for Travis-CI, CircleCI and AppVeyor for public repositories
# -X gcov disables gcov input if not needed
- pip install codecov==2.0.5
- codecov
# this needs to be here in after_test and not in on_success because artifacts are collected directly after after_test
# package application without ps
- gradlew.bat distribute
# stop the daemon to cache gradle files later on
- gradlew.bat --stop
artifacts:
- path: build\Rainmeter.sublime-package
cache:
- .gradle -> build.gradle
- '%userprofile%\.gradle -> build.gradle'
# enable this to block the VM from closing
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))