forked from sanity-io/sanity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (30 loc) · 1.06 KB
/
.travis.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
language: node_js
node_js:
- '6'
- '8'
- '10'
cache:
directories:
- "$HOME/.npm"
before_script:
- travis_wait npm run bootstrap
- npm run build
script:
# Allow running the Sanity CLI tool without specifying absolute path
- export PATH="${TRAVIS_BUILD_DIR}/packages/@sanity/cli/bin:$PATH"
# Build CLI to a single file
- cd packages/@sanity/cli
- npm run pack
# Remove source and dependencies from CLI to ensure it works standalone
- rm -rf packages/@sanity/cli/node_modules
- rm -rf packages/@sanity/cli/src && rm -rf packages/@sanity/cli/lib
# Test building the test studio with all customizations
- cd $TRAVIS_BUILD_DIR/packages/test-studio
- sanity build
# Test initializing a project in unattended mode
- sanity init -y --project=ppsg7ml5 --dataset=test --output-path=/tmp/test-project
# Use the newly commited changes instead of the latest dependencies from NPM
- cd /tmp/test-project
- $TRAVIS_BUILD_DIR/scripts/symlinkDependencies.js .
# Test building the project with latest dependencies
- sanity build --skip-minify