Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Run tests on Appveyor #899

Merged
merged 1 commit into from Jul 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 46 additions & 0 deletions appveyor.yml
@@ -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