Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
epidemian
GitHub Repository: epidemian/eslint-plugin-import
Path: blob/main/appveyor.yml
827 views
1
configuration:
2
- Native
3
- WSL
4
5
# Test against this version of Node.js
6
environment:
7
matrix:
8
- nodejs_version: "16"
9
- nodejs_version: "14"
10
- nodejs_version: "12"
11
- nodejs_version: "10"
12
- nodejs_version: "8"
13
# - nodejs_version: "6"
14
# - nodejs_version: "4"
15
16
image: Visual Studio 2019
17
matrix:
18
fast_finish: false
19
exclude:
20
- configuration: WSL
21
nodejs_version: "8"
22
- configuration: WSL
23
nodejs_version: "6"
24
- configuration: WSL
25
nodejs_version: "4"
26
27
allow_failures:
28
- nodejs_version: "4" # for eslint 5
29
30
platform:
31
- x86
32
- x64
33
34
# Initialization scripts. (runs before repo cloning)
35
init:
36
# Declare version-numbers of packages to install
37
- ps: >-
38
if ($env:nodejs_version -eq "4") {
39
$env:NPM_VERSION="3"
40
}
41
if ($env:nodejs_version -in @("8")) {
42
$env:NPM_VERSION="6"
43
}
44
if ($env:nodejs_version -in @("10", "12", "14", "16")) {
45
$env:NPM_VERSION="6" # TODO: use npm 7
46
$env:NPM_CONFIG_LEGACY_PEER_DEPS="true"
47
}
48
- ps: >-
49
$env:ESLINT_VERSION="7";
50
if ([int]$env:nodejs_version -le 8) {
51
$env:ESLINT_VERSION="6"
52
}
53
if ([int]$env:nodejs_version -le 7) {
54
$env:ESLINT_VERSION="5"
55
}
56
if ([int]$env:nodejs_version -le 6) {
57
$env:ESLINT_VERSION="4"
58
}
59
- ps: $env:WINDOWS_NYC_VERSION = "15.0.1"
60
- ps: $env:TRAVIS_NODE_VERSION = $env:nodejs_version
61
62
# Add `ci`-command to `PATH` for running commands either using cmd or wsl depending on the configuration
63
- ps: $env:PATH += ";$(Join-Path $(pwd) "scripts")"
64
65
# Install scripts. (runs after repo cloning)
66
before_build:
67
# Install propert `npm`-version
68
- IF DEFINED NPM_VERSION ci sudo npm install -g npm@%NPM_VERSION%
69
70
# Install dependencies
71
- ci npm install
72
- ci npm run copy-metafiles
73
- bash ./tests/dep-time-travel.sh 2>&1
74
75
# fix symlinks
76
- git config core.symlinks true
77
- git reset --hard
78
- ci git reset --hard
79
80
# Install dependencies of resolvers
81
- ps: >-
82
$resolverDir = "./resolvers";
83
$resolvers = @();
84
Get-ChildItem -Directory $resolverDir |
85
ForEach {
86
$resolvers += "$(Resolve-Path $(Join-Path $resolverDir $_))";
87
}
88
$env:RESOLVERS = [string]::Join(";", $resolvers);
89
- FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm install & popd )
90
91
# Install proper `eslint`-version
92
- IF DEFINED ESLINT_VERSION ci npm install --no-save eslint@%ESLINT_VERSION%
93
94
# Build scripts (project isn't actually built)
95
build_script:
96
- ps: "# This Project isn't actually built"
97
98
# Test scripts
99
test_script:
100
# Output useful info for debugging.
101
- ci node --version
102
- ci npm --version
103
104
# Run core tests
105
- ci npm run pretest
106
- ci npm run tests-only
107
108
# Run resolver tests
109
- ps: >-
110
$resolverDir = "./resolvers";
111
$resolvers = @();
112
Get-ChildItem -Directory $resolverDir |
113
ForEach {
114
$resolvers += "$(Resolve-Path $(Join-Path $resolverDir $_))";
115
}
116
$env:RESOLVERS = [string]::Join(";", $resolvers);
117
- FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm test & popd )
118
119
# Configuration-specific steps
120
for:
121
- matrix:
122
except:
123
- configuration: WSL
124
install:
125
# Get the latest stable version of Node.js or io.js
126
- ps: Install-Product node $env:nodejs_version
127
before_test:
128
# Upgrade nyc
129
- ci npm i --no-save nyc@%WINDOWS_NYC_VERSION%
130
- ps: >-
131
$resolverDir = "./resolvers";
132
$resolvers = @();
133
Get-ChildItem -Directory $resolverDir |
134
ForEach {
135
Push-Location $(Resolve-Path $(Join-Path $resolverDir $_));
136
ci npm ls nyc > $null;
137
if ($?) {
138
$resolvers += "$(pwd)";
139
}
140
Pop-Location;
141
}
142
$env:RESOLVERS = [string]::Join(";", $resolvers);
143
- IF DEFINED RESOLVERS FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm install --no-save nyc@%WINDOWS_NYC_VERSION% & popd )
144
# TODO: enable codecov for native windows builds
145
#on_success:
146
#- ci $ProgressPreference = 'SilentlyContinue'
147
#- ci Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe
148
#- ci -Outfile codecov.exe
149
#- ci .\codecov.exe
150
- matrix:
151
only:
152
- configuration: WSL
153
# Install scripts. (runs after repo cloning)
154
install:
155
# Get a specific version of Node.js
156
- ps: $env:WSLENV += ":nodejs_version"
157
- ps: wsl curl -sL 'https://deb.nodesource.com/setup_${nodejs_version}.x' `| sudo APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 -E bash -
158
- wsl sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
159
on_success:
160
- ci curl -Os https://uploader.codecov.io/latest/linux/codecov
161
- ci chmod +x codecov
162
- ci ./codecov
163
164
build: on
165
166