Skip to content

Commit

Permalink
add travis ci file
Browse files Browse the repository at this point in the history
  • Loading branch information
phpai committed Mar 22, 2019
1 parent 509e75e commit f20cb0e
Show file tree
Hide file tree
Showing 8 changed files with 317 additions and 286 deletions.
47 changes: 47 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
stages:
- test
- name: dockerbuild
if: branch = master

# provide PROJECT_NAME environment variable if you extend this template
.node-unit-test: &node-unit-test
stage: test
language: node_js
node_js:
- "10"
cache: npm
script:
- cd $PROJECT_NAME
- npm ci
- npm test

# provide PROJECT_NAME environment variable if you extend this template
.docker-build: &docker-build
stage: dockerbuild
language: minimal
services:
- docker
before_script:
- export BUILDTIMESTAMP=$(date -Iseconds)
- export TAG=trubudget/$PROJECT_NAME:$TRAVIS_BRANCH
# - docker pull $TAG|| true
script:
- cd $PROJECT_NAME
- docker build --build-arg BUILDTIMESTAMP=$BUILDTIMESTAMP --build-arg CI_COMMIT_SHA=$TRAVIS_COMMIT --tag $TAG -f Dockerfile .
# - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# - docker push $TAG

jobs:
include:
- <<: *node-unit-test
env: PROJECT_NAME=blockchain
- <<: *node-unit-test
env: PROJECT_NAME=api
- <<: *node-unit-test
env: PROJECT_NAME=frontend
- <<: *docker-build
env: PROJECT_NAME=blockchain
- <<: *docker-build
env: PROJECT_NAME=api
- <<: *docker-build
env: PROJECT_NAME=frontend
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# TruBudget-App

[![build status](https://travis-ci.com/openkfw/TruBudget.svg?branch=master)](https://travis-ci.com/openkfw/TruBudget)
[![gitter chat](https://img.shields.io/badge/chat-on%20gitter-brightgreen.svg)](https://gitter.im/Tru-Community/community)

## Getting Started

There are two options to run TruBudget either using the local sources or running the latest stable docker images.
Expand Down Expand Up @@ -42,7 +45,7 @@ Check out our [**Trubudget-Wiki**](./doc/README.md) to find out how Trubudget wo

## FAQ

| Description | Link |
| :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
| Description | Link |
| :-------------------- | :---------------------------------------------------------------------------------------------------------------- |
| How to run e2e-tests? | https://github.com/openkfw/TruBudget/blob/master/doc/wiki/Contributer-Guide/Contributer-Guide.md#end-to-end-tests |
| How to run unit-test? | https://github.com/openkfw/TruBudget/blob/master/doc/wiki/Contributer-Guide/Contributer-Guide.md#unit-tests |
Loading

0 comments on commit f20cb0e

Please sign in to comment.