-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5693813
commit d560b4e
Showing
7 changed files
with
192 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
version: "{build}" | ||
environment: | ||
TimeOutMins: 2 | ||
matrix: | ||
- job_name: Build | ||
appveyor_build_worker_image: Ubuntu | ||
nodejs_version: 14 | ||
|
||
# Ubuntu | ||
|
||
- job_name: Ubuntu Node.js v.10 | ||
job_group: Tests | ||
appveyor_build_worker_image: Ubuntu | ||
job_depends_on: Build | ||
nodejs_version: 10 | ||
|
||
- job_name: Ubuntu Node.js v.12 | ||
job_group: Tests | ||
appveyor_build_worker_image: Ubuntu | ||
job_depends_on: Build | ||
nodejs_version: 12 | ||
|
||
- job_name: Ubuntu Node.js v.14 | ||
job_group: Tests | ||
appveyor_build_worker_image: Ubuntu | ||
job_depends_on: Build | ||
nodejs_version: 14 | ||
|
||
- job_name: Ubuntu Node.js v.16 | ||
job_group: Tests | ||
appveyor_build_worker_image: Ubuntu | ||
job_depends_on: Build | ||
nodejs_version: 16 | ||
|
||
# MacOS | ||
|
||
- job_name: macOS Node.js v.10 | ||
job_group: Tests | ||
appveyor_build_worker_image: macos | ||
job_depends_on: Build | ||
nodejs_version: 10 | ||
|
||
- job_name: macOS Node.js v.12 | ||
job_group: Tests | ||
appveyor_build_worker_image: macos | ||
job_depends_on: Build | ||
nodejs_version: 12 | ||
|
||
- job_name: macOS Node.js v.14 | ||
job_group: Tests | ||
appveyor_build_worker_image: macos | ||
job_depends_on: Build | ||
nodejs_version: 14 | ||
|
||
- job_name: macOS Node.js v.16 | ||
job_group: Tests | ||
appveyor_build_worker_image: macos | ||
job_depends_on: Build | ||
nodejs_version: 16 | ||
|
||
# Windows | ||
|
||
- job_name: Windows Node.js v.10 | ||
job_group: Tests | ||
appveyor_build_worker_image: Visual Studio 2019 | ||
job_depends_on: Build | ||
nodejs_version: 10 | ||
|
||
- job_name: Windows Node.js v.12 | ||
job_group: Tests | ||
appveyor_build_worker_image: Visual Studio 2019 | ||
job_depends_on: Build | ||
nodejs_version: 12 | ||
|
||
- job_name: Windows Node.js v.14 | ||
job_group: Tests | ||
appveyor_build_worker_image: Visual Studio 2019 | ||
job_depends_on: Build | ||
nodejs_version: 14 | ||
|
||
- job_name: Windows Node.js v.16 | ||
job_group: Tests | ||
appveyor_build_worker_image: Visual Studio 2019 | ||
job_depends_on: Build | ||
nodejs_version: 16 | ||
|
||
matrix: | ||
allow_failures: | ||
- nodejs_version: 16 | ||
|
||
artifacts: | ||
- path: tmp | ||
name: package-tests | ||
|
||
for: | ||
|
||
- | ||
matrix: | ||
only: | ||
- job_name: Build | ||
|
||
build_script: | ||
- sh: nvm install $nodejs_version | ||
- sh: nvm use $nodejs_version | ||
- sh: npm config get user-agent | ||
- npm install | ||
- ./bin/pack-tests.sh | ||
- | ||
matrix: | ||
only: | ||
- job_group: Tests | ||
install: | ||
- sh: nvm install $nodejs_version | ||
- sh: nvm use $nodejs_version | ||
- ps: if ($isWindows) { Install-Product node $env:nodejs_version $env:platform } | ||
- npm config get user-agent | ||
before_build: | ||
- ps: | | ||
$headers = @{ | ||
"Authorization" = "Bearer $ApiKey" | ||
"Content-type" = "application/json" | ||
} | ||
[datetime]$stop = ([datetime]::Now).AddMinutes($env:TimeOutMins) | ||
[bool]$success = $false | ||
while(!$success -and ([datetime]::Now) -lt $stop) { | ||
$project = Invoke-RestMethod -Uri "https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG" -Headers $headers -Method GET | ||
|
||
$jobToWaitJson = $project.build.jobs | where {$_.name -eq "Build"} | ||
$success = $jobToWaitJson.status -eq "success" | ||
$jobToWaitId = $jobToWaitJson.jobId; | ||
if (!$success) {Start-sleep 5} | ||
} | ||
|
||
if (!$success) {throw "Job `"Build`" was not finished in $env:TimeOutMins minutes"} | ||
if (!$jobToWaitId) {throw "Unable t get JobId for the job `"Build`""} | ||
|
||
Start-FileDownload https://ci.appveyor.com/api/buildjobs/$jobToWaitId/artifacts/package-tests.zip | ||
build_script: | ||
- 7z x package-tests.zip | ||
- cd package-tests | ||
- npm i | ||
test_script: | ||
- sh: npm run test | ||
- cmd: npm run test-win |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Packing ..." | ||
TAR_NAME="$(npm pack 2>&1 | tail -1)" | ||
./bin/pack-tests.js $TAR_NAME | ||
mv $TAR_NAME tmp/package-tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Packing ..." | ||
TAR_NAME="$(npm pack 2>&1 | tail -1)" | ||
./bin/pack-tests.js $TAR_NAME | ||
echo "Packing ..." | ||
./bin/pack-tests.sh | ||
|
||
echo "Testing ..." | ||
echo "Install ..." | ||
cd ./tmp/package-tests | ||
npm i | ||
npm i --no-audit | ||
|
||
echo "Test ..." | ||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters