forked from sanity-io/sanity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
45 lines (35 loc) · 1.23 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
39
40
41
42
43
44
45
language: node_js
node_js:
- '8'
- '10'
cache:
directories:
- '$HOME/.npm'
install:
# todo: remove the `|| npm install` part below when we no run CI with node 6
- npm ci || npm install
before_script:
- travis_wait npm run bootstrap
- npm run build
script:
# Run tests in all packages
- npm run test-all
# 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
- cd /tmp
- 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