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

migrate to ci 2.0 #4939

Merged
merged 8 commits into from
Aug 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
version: 2

workflows:
version: 2
default:
jobs:
- build:
filters:
tags:
ignore: /v[0-9]+.[0-9]+.[0-9]+(-dev)?/
- build-and-release:
filters:
tags:
only: /v[0-9]+.[0-9]+.[0-9]+(-dev)?/
branches:
ignore: /.*/


jobs:
build:
docker:
- image: mbgl/ci:r4-linux-gl-js
working_directory: ~/mapbox-gl-js
resource_class: large
steps:
- checkout
- restore_cache:
key: v1-mapbox-gl-js-cache
- run:
name: install dependencies
command: yarn
- 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"
build-and-release:
docker:
- image: mbgl/ci:r4-linux-gl-js
working_directory: ~/mapbox-gl-js
resource_class: large
steps:
- checkout
- restore_cache:
key: v1-mapbox-gl-js-cache
- run:
name: install dependencies
command: yarn
- 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
when: on_success
command: bash ./.circleci/deploy.sh

File renamed without changes.
22 changes: 9 additions & 13 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 All @@ -18,29 +13,30 @@ PATH=$(python -m site --user-base)/bin:${PATH}
rm -rf coverage .nyc_output

# run linters
npm run lint
npm run lint-docs
npm run lint-css
yarn run lint
yarn run lint-docs
yarn run lint-css

# build and run build tests
npm run build-min
npm run build-dev
yarn run build-min
yarn run build-dev

# run flow to check types
npm run test-flow
yarn 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

# this code works around a Coveralls / CircleCI bug triggered by tagged builds
if [ -z "$CIRCLE_TAG" ]; then
(node ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info) || true
fi

# upload benchmarks
if [ "$CIRCLE_BRANCH" == "master" ]; then
npm run build-benchmarks
yarn run build-benchmarks
aws s3 cp --acl public-read --content-type application/javascript bench/benchmarks_generated.js s3://mapbox-gl-js/master/benchmarks.js
fi
23 changes: 0 additions & 23 deletions ci-scripts/dependencies.sh

This file was deleted.

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