From 267a3313d3bcdd726a4720d5c2f75bbcab642b4d Mon Sep 17 00:00:00 2001 From: Molly Lloyd Date: Fri, 30 Jun 2017 12:32:57 -0700 Subject: [PATCH] attempt to migrate to ci 2.0 delete old circle config increase allowable diff for failing tests test-tag v0.38.0-dev --- .circleci/config.yml | 36 +++++++++++++++++++ {ci-scripts => .circleci}/dependencies.sh | 9 ----- {ci-scripts => .circleci}/deploy.sh | 0 {ci-scripts => .circleci}/test.sh | 7 +--- circle.yml | 27 -------------- .../collision-pitched-wrapped/style.json | 3 +- .../debug/collision-pitched/style.json | 3 +- 7 files changed, 41 insertions(+), 44 deletions(-) create mode 100644 .circleci/config.yml rename {ci-scripts => .circleci}/dependencies.sh (67%) rename {ci-scripts => .circleci}/deploy.sh (100%) rename {ci-scripts => .circleci}/test.sh (92%) delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..f2d17f3b760 --- /dev/null +++ b/.circleci/config.yml @@ -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 diff --git a/ci-scripts/dependencies.sh b/.circleci/dependencies.sh similarity index 67% rename from ci-scripts/dependencies.sh rename to .circleci/dependencies.sh index 48e07e974a2..cdcbd037ef3 100755 --- a/ci-scripts/dependencies.sh +++ b/.circleci/dependencies.sh @@ -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 diff --git a/ci-scripts/deploy.sh b/.circleci/deploy.sh similarity index 100% rename from ci-scripts/deploy.sh rename to .circleci/deploy.sh diff --git a/ci-scripts/test.sh b/.circleci/test.sh similarity index 92% rename from ci-scripts/test.sh rename to .circleci/test.sh index 00667beb693..52077bc05ad 100755 --- a/ci-scripts/test.sh +++ b/.circleci/test.sh @@ -1,8 +1,3 @@ -#!/usr/bin/env bash - -source ./nvm/nvm.sh -nvm use ${NODE_VERSION} - set -e set -o pipefail @@ -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 diff --git a/circle.yml b/circle.yml deleted file mode 100644 index de71783cf36..00000000000 --- a/circle.yml +++ /dev/null @@ -1,27 +0,0 @@ -machine: - xcode: - version: 7.3 - environment: - XCODE_SCHEME: "no" - XCODE_WORKSPACE: "no" - NODE_VERSION: 6.10.1 - -dependencies: - cache_directories: - - './nvm' - - '~/.yarn' - - '.eslintcache' - override: - - ./ci-scripts/dependencies.sh -test: - override: - - ./ci-scripts/test.sh -deployment: - release: - tag: /v[0-9]+\.[0-9]+\.[0-9]+(\-dev)?/ - commands: - - ./ci-scripts/deploy.sh -general: - artifacts: - - "test/integration/render-tests/index.html" - - "test/integration/query-tests/index.html" diff --git a/test/integration/render-tests/debug/collision-pitched-wrapped/style.json b/test/integration/render-tests/debug/collision-pitched-wrapped/style.json index bb0e5d71ebb..586f810716d 100644 --- a/test/integration/render-tests/debug/collision-pitched-wrapped/style.json +++ b/test/integration/render-tests/debug/collision-pitched-wrapped/style.json @@ -4,7 +4,8 @@ "test": { "collisionDebug": true, "width": 500, - "height": 500 + "height": 500, + "diff": 0.005 } }, "center": [ diff --git a/test/integration/render-tests/debug/collision-pitched/style.json b/test/integration/render-tests/debug/collision-pitched/style.json index ba478b068b1..dc96393ec55 100644 --- a/test/integration/render-tests/debug/collision-pitched/style.json +++ b/test/integration/render-tests/debug/collision-pitched/style.json @@ -4,7 +4,8 @@ "test": { "collisionDebug": true, "width": 500, - "height": 500 + "height": 500, + "diff": 0.005 } }, "center": [