Skip to content

Commit 01fc982

Browse files
ning-yremo5000
authored andcommitted
Add Travis CI (#114)
* Add property locationHelper to session state * Track history in historyHelpers in state.session * Implement the behaviour on SOURCE ACADEMY button * Add travis config * Bump node version in travis to latest * Use node 9 in travis for yarn compat * Fix order of yarn builds (css -> js) * Add coveralls * Fix test-coveralls not looking for tsx? * Apply coverage-fix on test-coveralls * Add travis, coverall badges For consistency with the backend repository, and also a call for help (30% coverage lmao)
1 parent b485a87 commit 01fc982

File tree

4 files changed

+68
-1
lines changed

4 files changed

+68
-1
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: node_js
2+
node_js:
3+
- 9
4+
cache: yarn
5+
branches:
6+
except:
7+
- /^no-ci.*$/
8+
script:
9+
- yarn format:ci
10+
- yarn build-css
11+
- yarn build-js
12+
- yarn test-coveralls

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Cadet Frontend
1+
# Cadet Frontend
2+
3+
[![Build Status](https://travis-ci.org/source-academy/cadet-frontend.svg?branch=master)](https://travis-ci.org/source-academy/cadet-frontend)
4+
[![Coverage Status](https://coveralls.io/repos/github/source-academy/cadet-frontend/badge.svg?branch=travis)](https://coveralls.io/github/source-academy/cadet-frontend?branch=travis)
25

36
## Development Setup
47

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"start-js": "rm -r coverage; BROWSER=none PORT=80 react-scripts-ts start",
2020
"start": "npm-run-all -p watch-css start-js",
2121
"test": "react-scripts-ts test --env=jsdom",
22+
"test-coveralls": "./scripts/coverage-fix.sh do && react-scripts-ts test --env=jsdom --coverage --coverageReporters=text-lcov | coveralls",
2223
"update-ui-snapshots": "jest --updateSnapshot",
2324
"watch-css": "node-sass-chokidar src/ -o src/ --watch --recursive"
2425
},
@@ -82,6 +83,7 @@
8283
"@types/react-router-redux": "^5.0.13",
8384
"@types/react-test-renderer": "^16.0.1",
8485
"@types/redux-mock-store": "^0.0.13",
86+
"coveralls": "^3.0.1",
8587
"enzyme": "^3.3.0",
8688
"enzyme-adapter-react-16": "^1.1.1",
8789
"husky": "^1.0.0-rc.6",

yarn.lock

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,6 +2060,16 @@ cosmiconfig@^4.0.0:
20602060
parse-json "^4.0.0"
20612061
require-from-string "^2.0.1"
20622062

2063+
coveralls@^3.0.1:
2064+
version "3.0.1"
2065+
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.1.tgz#12e15914eaa29204e56869a5ece7b9e1492d2ae2"
2066+
dependencies:
2067+
js-yaml "^3.6.1"
2068+
lcov-parse "^0.0.10"
2069+
log-driver "^1.2.5"
2070+
minimist "^1.2.0"
2071+
request "^2.79.0"
2072+
20632073
cpx@^1.5.0:
20642074
version "1.5.0"
20652075
resolved "https://registry.yarnpkg.com/cpx/-/cpx-1.5.0.tgz#185be018511d87270dedccc293171e37655ab88f"
@@ -4705,6 +4715,13 @@ js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@^3.9.0:
47054715
argparse "^1.0.7"
47064716
esprima "^4.0.0"
47074717

4718+
js-yaml@^3.6.1:
4719+
version "3.12.0"
4720+
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
4721+
dependencies:
4722+
argparse "^1.0.7"
4723+
esprima "^4.0.0"
4724+
47084725
js-yaml@~3.7.0:
47094726
version "3.7.0"
47104727
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
@@ -4870,6 +4887,10 @@ lcid@^1.0.0:
48704887
dependencies:
48714888
invert-kv "^1.0.0"
48724889

4890+
lcov-parse@^0.0.10:
4891+
version "0.0.10"
4892+
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3"
4893+
48734894
left-pad@^1.2.0:
48744895
version "1.3.0"
48754896
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e"
@@ -5042,6 +5063,10 @@ lodash@^4.0.0, lodash@~4.17.4:
50425063
version "4.17.10"
50435064
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
50445065

5066+
log-driver@^1.2.5:
5067+
version "1.2.7"
5068+
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
5069+
50455070
loglevel@^1.4.1:
50465071
version "1.6.1"
50475072
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa"
@@ -7120,6 +7145,31 @@ [email protected]:
71207145
tunnel-agent "^0.6.0"
71217146
uuid "^3.0.0"
71227147

7148+
request@^2.79.0:
7149+
version "2.87.0"
7150+
resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e"
7151+
dependencies:
7152+
aws-sign2 "~0.7.0"
7153+
aws4 "^1.6.0"
7154+
caseless "~0.12.0"
7155+
combined-stream "~1.0.5"
7156+
extend "~3.0.1"
7157+
forever-agent "~0.6.1"
7158+
form-data "~2.3.1"
7159+
har-validator "~5.0.3"
7160+
http-signature "~1.2.0"
7161+
is-typedarray "~1.0.0"
7162+
isstream "~0.1.2"
7163+
json-stringify-safe "~5.0.1"
7164+
mime-types "~2.1.17"
7165+
oauth-sign "~0.8.2"
7166+
performance-now "^2.1.0"
7167+
qs "~6.5.1"
7168+
safe-buffer "^5.1.1"
7169+
tough-cookie "~2.3.3"
7170+
tunnel-agent "^0.6.0"
7171+
uuid "^3.1.0"
7172+
71237173
request@^2.83.0:
71247174
version "2.85.0"
71257175
resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa"

0 commit comments

Comments
 (0)