Skip to content

Commit

Permalink
fix windows support and split plugin tests (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-pipelines[bot] authored and rochdev committed Nov 15, 2018
1 parent 38601db commit 8e9c904
Show file tree
Hide file tree
Showing 39 changed files with 780 additions and 525 deletions.
288 changes: 201 additions & 87 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,10 @@
version: 2
docker-base: &docker-base

node-core-base: &node-core-base
docker:
- image: node:8
- &postgres
image: postgres:9.5
- &mysql
image: mysql:5.7
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=db
- &redis
image: redis:4.0-alpine
- &mongo
image: mongo:3.6
- &elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms64m -Xmx64m"
- &rabbitmq
image: rabbitmq:3.6-alpine
- &qpid
image: scholzj/qpid-cpp:1.38.0
command: -p 5673
environment:
- QPIDD_ADMIN_USERNAME=admin
- QPIDD_ADMIN_PASSWORD=admin
- &memcached
image: memcached:1.5-alpine
build-node-base: &node-base
<<: *docker-base
working_directory: ~/dd-trace-js
resource_class: small
steps:
- checkout
- run:
Expand All @@ -49,16 +23,49 @@ build-node-base: &node-base
- ./node_modules
- ./yarn.lock
- run:
name: Test
command: yarn test
name: Unit tests
command: yarn test:core
- run:
name: Benchmark
command: yarn bench

node-plugin-base: &node-plugin-base
docker:
- image: node:8
working_directory: ~/dd-trace-js
resource_class: small
steps:
- checkout
- run:
name: Versions
command: yarn versions
- &restore-yarn-cache
restore_cache:
key: yarn-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: yarn install
- &save-yarn-cache
save_cache:
key: yarn-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.json" }}
paths:
- ./node_modules
- ./yarn.lock
- run:
name: Unit tests
command: yarn test:plugins
- run:
name: Memory leak tests
command: yarn leak:plugins

jobs:
# Linting

lint:
docker:
- image: node
working_directory: ~/dd-trace-js
resource_class: small
steps:
- checkout
- run:
Expand All @@ -72,9 +79,34 @@ jobs:
- run:
name: Lint
command: yarn lint
test-memory-leaks:
<<: *docker-base

# Core tests

node-core-4:
<<: *node-core-base
docker:
- image: node:4

node-core-6:
<<: *node-core-base
docker:
- image: node:6

node-core-8:
<<: *node-core-base
docker:
- image: node:8

node-core-latest:
<<: *node-core-base
docker:
- image: node

node-leaks:
docker:
- image: node:8
working_directory: ~/dd-trace-js
resource_class: small
steps:
- checkout
- run:
Expand All @@ -86,67 +118,138 @@ jobs:
command: yarn install
- *save-yarn-cache
- run:
name: Test
command: yarn leak
build-node-4:
<<: *node-base
name: Memory leak tests
command: yarn leak:core

# Plugin tests

node-amqplib:
<<: *node-plugin-base
docker:
- image: node:4
- *postgres
- *mysql
- *redis
- *mongo
- *elasticsearch
- *rabbitmq
- *qpid
- *memcached
build-node-6:
<<: *node-base
- image: node:8
environment:
- SERVICES=rabbitmq
- PLUGINS=amqplib
- image: rabbitmq:3.6-alpine

node-amqp10:
<<: *node-plugin-base
docker:
- image: node:6
- *postgres
- *mysql
- *redis
- *mongo
- *elasticsearch
- *rabbitmq
- *qpid
- *memcached
build-node-8:
<<: *node-base
- image: node:8
environment:
- SERVICES=qpid
- PLUGINS=amqp10
- image: scholzj/qpid-cpp:1.38.0
command: -p 5673
environment:
- QPIDD_ADMIN_USERNAME=admin
- QPIDD_ADMIN_PASSWORD=admin

node-elasticsearch:
<<: *node-plugin-base
docker:
- image: node:8
- *postgres
- *mysql
- *redis
- *mongo
- *elasticsearch
- *rabbitmq
- *qpid
- *memcached
build-node-latest:
<<: *node-base
environment:
- SERVICES=elasticsearch
- PLUGINS=elasticsearch
- image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms64m -Xmx64m"

node-graphql:
<<: *node-plugin-base
docker:
- image: node
- *postgres
- *mysql
- *redis
- *mongo
- *elasticsearch
- *rabbitmq
- *qpid
- *memcached
- image: node:8
environment:
- SERVICES=
- PLUGINS=graphql

node-http:
<<: *node-plugin-base
docker:
- image: node:8
environment:
- SERVICES=
- PLUGINS=http

node-memcached:
<<: *node-plugin-base
docker:
- image: node:8
environment:
- SERVICES=memcached
- PLUGINS=memcached
- image: memcached:1.5-alpine

node-mysql:
<<: *node-plugin-base
docker:
- image: node:8
environment:
- SERVICES=mysql
- PLUGINS=mysql|mysql2
- image: mysql:5.7
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=db

node-mongo:
<<: *node-plugin-base
docker:
- image: node:8
environment:
- SERVICES=mongo
- PLUGINS=mongodb-core
- image: mongo:3.6

node-postgres:
<<: *node-plugin-base
docker:
- image: node:8
environment:
- SERVICES=postgres
- PLUGINS=pg
- image: postgres:9.5

node-redis:
<<: *node-plugin-base
docker:
- image: node:8
environment:
- SERVICES=redis
- PLUGINS=redis|ioredis
- image: redis:4.0-alpine

node-web:
<<: *node-plugin-base
docker:
- image: node:8
environment:
- SERVICES=
- PLUGINS=express|hapi|koa|restify

workflows:
version: 2
build:
jobs:
- lint
- test-memory-leaks
- build-node-4
- build-node-6
- build-node-8
- build-node-latest
- node-leaks
- node-core-4
- node-core-6
- node-core-8
- node-core-latest
- node-amqplib
- node-amqp10
- node-elasticsearch
- node-graphql
- node-http
- node-memcached
- node-mongo
- node-mysql
- node-postgres
- node-redis
- node-web
nightly:
triggers:
- schedule:
Expand All @@ -156,7 +259,18 @@ workflows:
only:
- master
jobs:
- build-node-4
- build-node-6
- build-node-8
- build-node-latest
- node-core-4
- node-core-6
- node-core-8
- node-core-latest
- node-amqplib
- node-amqp10
- node-elasticsearch
- node-graphql
- node-http
- node-memcached
- node-mongo
- node-mysql
- node-postgres
- node-redis
- node-web
6 changes: 5 additions & 1 deletion .nycrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"include": ["src"]
"include": ["src"],
"reporter": [
"text",
"lcov"
]
}
15 changes: 1 addition & 14 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ require,require-in-the-middle,MIT,Copyright 2016-2018 Thomas Watson Steen
require,safe-buffer,MIT,Copyright Feross Aboukhadijeh
require,shimmer,BSD-2-Clause,Copyright Forrest L Norvell
require,url-parse,MIT,Copyright 2015 Unshift.io Arnout Kazemier the Contributors
dev,amqp10,MIT,Copyright 2014 Michael Lanzetta
dev,amqplib,MIT,Copyright 2013-2014 Michael Bridgen
dev,axios,MIT,Copyright 2014-present Matt Zabriskie
dev,benchmark,MIT,Copyright 2010-2016 Mathias Bynens Robert Kieffer John-David Dalton
dev,bluebird,MIT,Copyright 2013-2018 Petka Antonov
dev,body-parser,MIT,Copyright 2014 Jonathan Ong 2014-2015 Douglas Christopher Wilson
dev,chai,MIT,Copyright 2017 Chai.js Assertion Library
dev,elasticsearch,Apache-2.0,Copyright 2013 Elasticsearch BV
dev,eslint,MIT,Copyright JS Foundation and other contributors https://js.foundation
dev,eslint-config-standard,MIT,Copyright Feross Aboukhadijeh
dev,eslint-plugin-import,MIT,Copyright 2015 Ben Mosher
Expand All @@ -35,22 +31,13 @@ dev,eslint-plugin-standard,MIT,Copyright 2015 Jamund Ferguson
dev,eventemitter3,MIT,Copyright 2014 Arnout Kazemier
dev,express,MIT,Copyright 2009-2014 TJ Holowaychuk 2013-2014 Roman Shtylman 2014-2015 Douglas Christopher Wilson
dev,get-port,MIT,Copyright Sindre Sorhus
dev,graphql,MIT,Copyright 2015-present Facebook Inc.
dev,memcached,MIT,Copyright 2010 Arnout Kazemier and 3rd-Eden
dev,mocha,MIT,Copyright 2011-2018 JS Foundation and contributors https://js.foundation
dev,mongodb-core,Apache-2.0,Copyright Christian Kvalheim
dev,mysql,MIT,Copyright 2012 Felix Geisendörfer and contributors
dev,mysql2,MIT,Copyright 2016 Andrey Sidorov and contributors
dev,nock,MIT,Copyright 2017 Pedro Teixeira and other contributors
dev,nyc,ISC,Copyright 2015 Contributors
dev,pg,MIT,Copyright 2010-2018 Brian Carlson
dev,proxyquire,MIT,Copyright 2013 Thorsten Lorenz
dev,redis,MIT,Copyright 2016 NodeRedis
dev,require-dir,MIT,2012-2015 Aseem Kishore
dev,retry,MIT,Copyright 2011 Tim Koschützki Felix Geisendörfer
dev,selfsigned,MIT,Copyright 2013 José F. Romaniello
dev,semver,ISC,Copyright Isaac Z. Schlueter and Contributors
dev,sinon,BSD-3-Clause,Copyright 2010-2017 Christian Johansen
dev,sinon-chai,WTFPL and BSD-2-Clause,Copyright 2004 Sam Hocevar 2012–2017 Domenic Denicola
dev,tape,MIT,Copyright James Halliday
dev,ws,MIT,Copyright 2011 Einar Otto Stangvik
dev,v8-coverage,ISC,Copyright Eywek
Loading

0 comments on commit 8e9c904

Please sign in to comment.