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

test merge #7

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
language: node_js
node_js:
- '0.10'
addons:
sonar-scanner \
-Dsonar.projectKey=Calculator-5 \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=paudiehealy-github \
-Dsonar.login=7379dd5dcd9dcb03159d98a84d27f61d5c88e7e0
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM centos:centos6

MAINTAINER [email protected]

# Enable EPEL for Node.js
RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

# Install Node...
RUN yum install -y npm

# Copy app to /src
COPY . /src

# Install app and dependencies into /src
RUN cd /src; npm install

EXPOSE 8080

CMD cd /src && node ./app.js
60 changes: 60 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:7.10

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn test
- run: npm install
- run: npm test

dependencies:
override:
- bundle install:
timeout: 240
environment:
foo: bar
foo2: bar2
pwd:
test_dir
test:
override:
- mkdir -p $CIRCLE_TEST_REPORTS/reports
- ava --tap | tap-xunit > $CIRCLE_TEST_REPORTS/reports/ava.xml

# testing with the new branch
test:
override:
- mocha test --reporter mocha-junit-reporter:
environment:
MOCHA_FILE: $CIRCLE_TEST_REPORTS/junit/test-results.xml
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
"homepage": "https://github.com/dominhhai/calculator#readme",
"devDependencies": {
"faucet": "0.0.1",
"jest": "^22.4.3",
"standard": "^4.0.1",
"tape": "^4.0.0"
},
"dependencies": {
"copy-paste": "^1.1.2"
},
"directories": {
"test": "test"
}
}