diff --git a/.circleci/config.yml b/.circleci/config.yml index 33fa784..bfb216a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,9 +57,30 @@ jobs: name: Run tests command: npm test + script: + docker: + - image: circleci/node:10-browsers + working_directory: ~/offen/script + steps: + - checkout: + path: ~/offen + - restore_cache: + key: offen-script-{{ checksum "package.json" }} + - run: + name: Install dependencies + command: npm install + - save_cache: + paths: + - ~/offen/script/node_modules + key: offen-script-{{ checksum "package.json" }} + - run: + name: Run tests + command: npm test + workflows: version: 2 build_and_test: jobs: - server - vault + - script diff --git a/README.md b/README.md index 34c6402..6a1c2f4 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,30 @@ cd vault npm test ``` +#### `script` + +To work on the `script` you will need to install `docker-compose`. + +First, install the project's dependencies: + +``` +cd script +npm install +``` + +Run the server: + +``` +docker-compose up +``` + +Run the tests: + +``` +cd script +npm test +``` + ### License diff --git a/docker-compose.yml b/docker-compose.yml index 55f2efa..c41f652 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,3 +32,16 @@ vault: - 9977:9977 environment: - SERVER_HOST=https://local.offen.dev:8080 + +script: + image: timbru31/node-chrome:slim + working_dir: /script + volumes: + - ./script:/script + - ./local.offen.dev.pem:/script/local.offen.dev.pem + - ./local.offen.dev-key.pem:/script/local.offen.dev-key.pem + command: npm start -- --port 9966 + ports: + - 9966:9966 + environment: + - VAULT_HOST=https://local.offen.dev:9977