Skip to content

Commit

Permalink
feat(ci): add travis-ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Yorsh committed May 29, 2019
1 parent 6760bb2 commit 76f2977
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 18 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sudo: false
language: node_js
node_js:
- '8'
env:
matrix:
- MODE=lint
- MODE=build
- MODE=test
matrix:
fast_finish: true
install:
- npm i
script:
- scripts/travis-ci-script.sh
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"version": "0.0.1",
"license": "MIT",
"author": "akveo <[email protected]>",
"homepage": "https://github.com/akveo/eva#readme",
"repository": "git+https://github.com/akveo/eva.git",
"homepage": "https://github.com/eva-design/eva#readme",
"repository": "git+https://github.com/eva-design/eva.git",
"bugs": {
"url": "https://github.com/akveo/eva/issues"
"url": "https://github.com/eva-design/eva/issues"
},
"scripts": {
"build": "tsc",
Expand All @@ -17,7 +17,10 @@
"lint:fix": "npm run lint -- --fix",
"gen:js": "ts-node ./packages/processor/js/scripts/generateExisting",
"gen:js-custom": "ts-node ./packages/processor/js/scripts/customize",
"test": "jest"
"test": "jest",
"ci:lint": "npm run lint",
"ci:build": "npm run build",
"ci:test": "npm run test"
},
"devDependencies": {
"@types/jest": "^24.0.13",
Expand Down
6 changes: 3 additions & 3 deletions packages/dss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"version": "0.0.1",
"license": "MIT",
"author": "akveo <[email protected]>",
"homepage": "https://github.com/akveo/eva#readme",
"repository": "git+https://github.com/akveo/eva.git",
"homepage": "https://github.com/eva-design/eva#readme",
"repository": "git+https://github.com/eva-design/eva.git",
"bugs": {
"url": "https://github.com/akveo/eva/issues"
"url": "https://github.com/eva-design/eva/issues"
}
}
8 changes: 4 additions & 4 deletions packages/eva/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"version": "0.0.1",
"license": "MIT",
"author": "akveo <[email protected]>",
"homepage": "https://github.com/akveo/eva#readme",
"repository": "git+https://github.com/akveo/eva.git",
"homepage": "https://github.com/eva-design/eva#readme",
"repository": "git+https://github.com/eva-design/eva.git",
"bugs": {
"url": "https://github.com/akveo/eva/issues"
"url": "https://github.com/eva-design/eva/issues"
},
"devDependencies": {
"@eva-design/dss": "github:akveo/eva#package/dss"
"@eva-design/dss": "github:eva-design/eva#package/dss"
}
}
6 changes: 3 additions & 3 deletions packages/processor/js/scripts/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export function generateMappingPackage(source: string) {
version: '0.0.1',
license: 'MIT',
author: 'akveo <[email protected]>',
homepage: 'https://github.com/akveo/eva#readme',
repository: 'git+https://github.com/akveo/eva.git',
homepage: 'https://github.com/eva-design/eva#readme',
repository: 'git+https://github.com/eva-design/eva.git',
bugs: {
url: 'https://github.com/akveo/eva/issues',
url: 'https://github.com/eva-design/eva/issues',
},
});

Expand Down
8 changes: 4 additions & 4 deletions packages/processor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"version": "0.0.1",
"license": "MIT",
"author": "akveo <[email protected]>",
"homepage": "https://github.com/akveo/eva#readme",
"repository": "git+https://github.com/akveo/eva.git",
"homepage": "https://github.com/eva-design/eva#readme",
"repository": "git+https://github.com/eva-design/eva.git",
"bugs": {
"url": "https://github.com/akveo/eva/issues"
"url": "https://github.com/eva-design/eva/issues"
},
"devDependencies": {
"@eva-design/dss": "github:akveo/eva#package/dss"
"@eva-design/dss": "github:eva-design/eva#package/dss"
}
}
27 changes: 27 additions & 0 deletions scripts/travis-ci-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Script that runs in every Travis CI container. The script is responsible for delegating
# to the different scripts that should run for specific Travis jobs in a build stage.

# The script should immediately exit if any command in the script fails.
set -e

# Go to project directory
cd $(dirname $0)/..

echo ""
echo "Building sources and running tests. Running mode: ${MODE}"
echo ""

if [[ -z "$TRAVIS" ]]; then
echo "This script can only run inside of Travis build jobs."
exit 1
fi

if [[ "${MODE}" = lint ]]; then
npm run ci:lint
elif [[ "${MODE}" = build ]]; then
npm run ci:build
elif [[ "${MODE}" =~ test ]]; then
npm run ci:test
fi

0 comments on commit 76f2977

Please sign in to comment.