From 3a172bf1e4baecde9e2d82bc5c1af31c6241e66d Mon Sep 17 00:00:00 2001 From: heyarne Date: Sat, 14 Dec 2019 09:13:31 +0100 Subject: [PATCH] Add build step to circleci config --- .circleci/config.yml | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2761835..51680d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,5 @@ version: 2 + jobs: test: working_directory: ~/repo @@ -11,19 +12,51 @@ jobs: - restore_cache: keys: - build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} - - run: npm install - - run: npm run test + - run: + name: Install dependencies + command: npm install + - run: + name: Test + command: npm test - save_cache: paths: - node_modules - ~/.m2 + - ~/.npm key: build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} + build: + working_directory: ~/repo + docker: + - image: circleci/openjdk:11-jdk-stretch-node-browsers + steps: + - checkout + - restore_cache: + keys: + - build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} + - run: + name: Install dependencies + command: npm install + - run: + name: Build SPA + command: npm run build + - save_cache: + paths: + - node_modules + - ~/.m2 + - ~/.npm + key: build_cache-{{ checksum "package.json" }}-{{ checksum "shadow-cljs.edn" }} + - persist_to_workspace: + root: /home/circleci/repo/public + paths: + - "*" + workflows: version: 2 - test: + build: jobs: - test: filters: branches: ignore: - gh-pages + - build