Skip to content

Commit

Permalink
Merge pull request #273 from alphagov/BAU-pr-builds-with-travis
Browse files Browse the repository at this point in the history
BAU: simple travis.yml build
  • Loading branch information
rjbaker authored Jan 9, 2020
2 parents 3cc56a7 + 30f8ee7 commit 8187316
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
dist: bionic
language: node_js
node_js:
- 12.2.0

addons:
apt:
packages:
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves
- libgconf-2-4

cache:
# Caches $HOME/.npm when npm ci is default script command
# Caches node_modules in all other cases
npm: true

install:
- npm ci

jobs:
include:
- stage: "Tests"
name: "Lint & Test"
script:
- npm run lint
- npm run build
- npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dev": "tsc-watch --noClear --onSuccess \"./scripts/run-dev\"",
"lint": "eslint \"src/**/*.{js,ts}\"",
"test": "npm run test:unit",
"test:unit": "AUTH_GITHUB_ENABLED=true mocha -r ts-node/register --recursive \"./src/**/*.spec.{js,ts}\"",
"test:unit": "AUTH_GITHUB_ENABLED=true mocha -r ts-node/register -r dotenv/config --recursive \"./src/**/*.spec.{js,ts}\" dotenv_config_path=src/tests/.env",
"test:cypress": "./scripts/run-cypress",
"build": "scripts/build && npm run build:typescript && npm run build:copy && npm run build:sass",
"build:typescript": "tsc",
Expand Down
12 changes: 12 additions & 0 deletions src/tests/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ADMINUSERS_URL=http://localhost:9001
CONNECTOR_URL=http://localhost:9003
DIRECT_DEBIT_CONNECTOR_URL=http://localhost:9004
PRODUCTS_URL=http://localhost:9005
PUBLIC_AUTH_URL=http://localhost:9006
LEDGER_URL=http://localhost:9007
PORT=3000
NODE_ENV=development
BUILD_FOLDER_ROOT=$PWD/dist
TOOLBOX_FILE_ROOT=$PWD
COOKIE_SESSION_ENCRYPTION_SECRET=Wtqf3C5t4f8vd68snKp86RDyfUN2HEj2
AUTH_GITHUB_ENABLED=false

0 comments on commit 8187316

Please sign in to comment.