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
5f990c7
commit a7cbfd2
Showing
1 changed file
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
environment: | ||
matrix: | ||
- nodejs_version: "10" | ||
- nodejs_version: "8" | ||
- nodejs_version: "6" | ||
|
||
install: | ||
- ps: Install-Product node $env:nodejs_version | ||
- npm install | ||
- npm run bootstrap | ||
- npm run build | ||
|
||
test_script: | ||
- node --version | ||
- npm --version | ||
|
||
# Allow running the Sanity CLI tool without specifying absolute path | ||
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\packages\@sanity\bin | ||
|
||
# Build CLI to a single file | ||
- cd packages\@sanity\cli | ||
- npm run pack | ||
- npm i -g | ||
|
||
# Remove source and dependencies from CLI to ensure it works standalone | ||
- cd %APPVEYOR_BUILD_FOLDER% | ||
- rd /s /q packages\@sanity\cli\node_modules | ||
- rd /s /q packages\@sanity\cli\src | ||
- rd /s /q packages\@sanity\cli\lib | ||
|
||
# Test building the test studio with all customizations | ||
- cd %APPVEYOR_BUILD_FOLDER%\packages\test-studio | ||
- sanity build | ||
|
||
# Test initializing a project in unattended mode | ||
- mkdir %APPVEYOR_BUILD_FOLDER%\tmp | ||
- sanity init -y --project=ppsg7ml5 --dataset=test --output-path=%APPVEYOR_BUILD_FOLDER%\tmp | ||
|
||
# Use the newly commited changes instead of the latest dependencies from NPM | ||
- cd %APPVEYOR_BUILD_FOLDER%\tmp | ||
- node %APPVEYOR_BUILD_FOLDER%\scripts\symlinkDependencies.js . | ||
|
||
# Test building the project with latest dependencies | ||
- sanity build --skip-minify | ||
|
||
build: off |