Skip to content

Commit

Permalink
build(circleci): clean up config
Browse files Browse the repository at this point in the history
  • Loading branch information
Pete Colapietro committed Oct 2, 2020
1 parent ebcb62a commit 713bfc7
Showing 1 changed file with 38 additions and 26 deletions.
64 changes: 38 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defaults: &defaults
working_directory: ~/app

supported-node-versions: &supported-node-versions
node-version: ["10.20.1", "12.16.3", "13.14.0", "14.2.0"]
node-version: ["10.21.0", "12.18.0", "13.14.0", "14.4.0"]



Expand All @@ -29,7 +29,7 @@ jobs:
<<: *defaults

docker:
- image: circleci/node:lts
- image: cimg/node:lts

steps:
- restore_cache:
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
type: string

docker:
- image: "circleci/node:<< parameters.node-version >>"
- image: "cimg/node:<< parameters.node-version >>"

steps:

Expand Down Expand Up @@ -100,11 +100,41 @@ jobs:
<<: *defaults

docker:
- image: "circleci/node:lts"
- image: "cimg/node:lts"

steps:
- checkout

- restore_cache:
name: Restore npm Package Cache
keys:
- "npm-{{ checksum \"package-lock.json\" }}"

- run:
name: Install Dependencies
command: npm install

- run:
name: Build the Framework
command: npm run build

- save_cache:
name: Save Build Cache
key: build-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- css

- save_cache:
name: Save npm Package Cache
key: "npm-{{ checksum \"package-lock.json\" }}"
paths:
- "node_modules"

- persist_to_workspace:
root: .
paths:
- css

build-in-all-supported-versions-of-node:
<<: *defaults

Expand All @@ -113,7 +143,7 @@ jobs:
type: string

docker:
- image: "circleci/node:<< parameters.node-version >>"
- image: "cimg/node:<< parameters.node-version >>"

steps:
- attach_workspace:
Expand All @@ -123,34 +153,15 @@ jobs:
name: Move node_modules to correct location for build
command: "[ ! -d \"node_modules_<< parameters.node-version >>\" ] || mv \"node_modules_<< parameters.node-version >>\" node_modules"

- restore_cache:
name: Restore Build Cache
keys:
- build-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
- build-{{ .Branch }}
- build-master
- build-

- run:
name: Build the Framework
command: npm run build

- save_cache:
name: Save Build Cache
key: build-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- css

- persist_to_workspace:
root: .
paths:
- css

lint:
<<: *defaults

docker:
- image: "circleci/node:lts"
- image: "cimg/node:lts"

steps:
- attach_workspace:
Expand Down Expand Up @@ -196,7 +207,7 @@ jobs:
<<: *defaults

docker:
- image: circleci/node:lts
- image: cimg/node:lts

steps:
- attach_workspace:
Expand Down Expand Up @@ -245,6 +256,7 @@ workflows:
- release:
requires:
- commitlint
- build
- build-in-all-supported-versions-of-node
- lint
# - test
Expand Down

0 comments on commit 713bfc7

Please sign in to comment.