Skip to content

Commit

Permalink
attempt to migrate to ci 2.0
Browse files Browse the repository at this point in the history
delete old circle config

increase allowable diff for failing tests

test-tag v0.38.0-dev
  • Loading branch information
Molly Lloyd committed Aug 14, 2017
1 parent 4eb5d98 commit 267a331
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 44 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2

jobs:
build:
docker:
- image: mbgl/ci:r4-linux-clang-3.9
working_directory: ~/mapbox-gl-js
steps:
- checkout
- restore_cache:
key: v1-mapbox-gl-js-cache
- run:
name: install dependencies
command: |
bash ./.circleci/dependencies.sh
- save_cache:
key: v1-mapbox-gl-js-cache
paths:
- '~/.yarn'
- '.eslintcache'
- 'node_modules'
- run:
name: run tests
command: |
bash ./.circleci/test.sh
- store_artifacts:
path: "test/integration/render-tests/index.html"
- store_artifacts:
path: "test/integration/query-tests/index.html"
- run:
name: deploy if tagged
when: on_success
command: |
if [[ $CIRCLE_TAG =~ v[0-9]+\.[0-9]+\.[0-9]+(\-dev)? ]]; then
bash ./deploy.sh
fi
9 changes: 0 additions & 9 deletions ci-scripts/dependencies.sh → .circleci/dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# disable spotlight to ensure we waste no CPU on needless file indexing
if [[ $(uname -s) == 'Darwin' ]]; then sudo mdutil -i off /; fi;

if [[ ! -d ./nvm ]]; then
git clone --depth 1 https://github.com/creationix/nvm.git ./nvm
fi

source ./nvm/nvm.sh

nvm install ${NODE_VERSION}
nvm use ${NODE_VERSION}

if [[ ! -d ~/.yarn ]]; then
curl -o- -L https://yarnpkg.com/install.sh | bash
fi
Expand Down
File renamed without changes.
7 changes: 1 addition & 6 deletions ci-scripts/test.sh → .circleci/test.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#!/usr/bin/env bash

source ./nvm/nvm.sh
nvm use ${NODE_VERSION}

set -e
set -o pipefail

Expand Down Expand Up @@ -30,7 +25,7 @@ npm run build-dev
npm run test-flow

# run unit, render & query tests with coverage
npm run test-cov
xvfb-run --server-args="-screen 0 1024x768x24" npm run test-cov

# send coverage report to coveralls
nyc report --reporter=lcov
Expand Down
27 changes: 0 additions & 27 deletions circle.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"test": {
"collisionDebug": true,
"width": 500,
"height": 500
"height": 500,
"diff": 0.005
}
},
"center": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"test": {
"collisionDebug": true,
"width": 500,
"height": 500
"height": 500,
"diff": 0.005
}
},
"center": [
Expand Down

0 comments on commit 267a331

Please sign in to comment.