From 758586769358820bd63e852f6913a98bfee0158d Mon Sep 17 00:00:00 2001 From: yagni Date: Thu, 10 Nov 2022 08:26:06 -0600 Subject: [PATCH 1/2] Add packages needed to run Chrome headless on CircleCI. --- .circleci/config.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 075324f..f063f5e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,9 +1,14 @@ -version: 2 +version: 2.1 + +orbs: + browser-tools: circleci/browser-tools@1.4.0 defaults: &defaults working_directory: ~/repo docker: - - image: circleci/node:16.13 + - image: cimg/node:16.18-browsers + environment: + NODE_ENV: development jobs: test: @@ -13,15 +18,15 @@ jobs: - restore_cache: keys: - v1-dependencies-{{ checksum "package.json" }} - - v1-dependencies- - run: npm install - run: npm run build:ci + - browser-tools/install-browser-tools - save_cache: paths: - node_modules + - ~/.cache/puppeteer key: v1-dependencies-{{ checksum "package.json" }} - # TODO: Support for unit tests in status check - # - run: npm run test + - run: npm run test # Publish latest deploy: From c8755885d9515a7f650187ea39b685f28d4e2ffc Mon Sep 17 00:00:00 2001 From: yagni Date: Tue, 22 Nov 2022 09:13:52 -0600 Subject: [PATCH 2/2] fix(ci): Cache on package-lock.json so cache is rebuilt if any dependencies are updated. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f063f5e..350b174 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,7 @@ jobs: - checkout - restore_cache: keys: - - v1-dependencies-{{ checksum "package.json" }} + - v1-dependencies-{{ checksum "package-lock.json" }} - run: npm install - run: npm run build:ci - browser-tools/install-browser-tools @@ -25,7 +25,7 @@ jobs: paths: - node_modules - ~/.cache/puppeteer - key: v1-dependencies-{{ checksum "package.json" }} + key: v1-dependencies-{{ checksum "package-lock.json" }} - run: npm run test # Publish latest