mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-31 01:39:50 +02:00
Merge pull request #428 from virtuoushub/node-security-fixes-and-circleci-cleanup
Node security fixes and circleci cleanup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
orbs:
|
||||
node: circleci/node@2.1.0
|
||||
node: circleci/node@4.0.1
|
||||
version: 2.1
|
||||
|
||||
defaults: &defaults
|
||||
@@ -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.22.1", "12.18.4", "14.13.0"]
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
<<: *defaults
|
||||
|
||||
docker:
|
||||
- image: circleci/node:lts
|
||||
- image: cimg/node:lts
|
||||
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
type: string
|
||||
|
||||
docker:
|
||||
- image: "circleci/node:<< parameters.node-version >>"
|
||||
- image: "cimg/node:<< parameters.node-version >>"
|
||||
|
||||
steps:
|
||||
|
||||
@@ -100,36 +100,19 @@ jobs:
|
||||
<<: *defaults
|
||||
|
||||
docker:
|
||||
- image: "circleci/node:lts"
|
||||
- image: "cimg/node:lts"
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
build-in-all-supported-versions-of-node:
|
||||
<<: *defaults
|
||||
|
||||
parameters:
|
||||
node-version:
|
||||
type: string
|
||||
|
||||
docker:
|
||||
- image: "circleci/node:<< parameters.node-version >>"
|
||||
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- restore_cache:
|
||||
name: Restore npm Package Cache
|
||||
keys:
|
||||
- "npm-{{ checksum \"package-lock.json\" }}"
|
||||
|
||||
- run:
|
||||
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-
|
||||
name: Install Dependencies
|
||||
command: npm install
|
||||
|
||||
- run:
|
||||
name: Build the Framework
|
||||
@@ -140,17 +123,51 @@ jobs:
|
||||
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
|
||||
|
||||
- store_artifacts:
|
||||
path: css
|
||||
|
||||
build-in-all-supported-versions-of-node:
|
||||
<<: *defaults
|
||||
|
||||
parameters:
|
||||
node-version:
|
||||
type: string
|
||||
|
||||
docker:
|
||||
- image: "cimg/node:<< parameters.node-version >>"
|
||||
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
|
||||
- run:
|
||||
name: Move node_modules to correct location for build
|
||||
command: "[ ! -d \"node_modules_<< parameters.node-version >>\" ] || mv \"node_modules_<< parameters.node-version >>\" node_modules"
|
||||
|
||||
- run:
|
||||
name: Build the Framework
|
||||
command: npm run build
|
||||
|
||||
- store_artifacts:
|
||||
path: css
|
||||
|
||||
lint:
|
||||
<<: *defaults
|
||||
|
||||
docker:
|
||||
- image: "circleci/node:lts"
|
||||
- image: "cimg/node:lts"
|
||||
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@@ -196,7 +213,7 @@ jobs:
|
||||
<<: *defaults
|
||||
|
||||
docker:
|
||||
- image: circleci/node:lts
|
||||
- image: cimg/node:lts
|
||||
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@@ -245,6 +262,7 @@ workflows:
|
||||
- release:
|
||||
requires:
|
||||
- commitlint
|
||||
- build
|
||||
- build-in-all-supported-versions-of-node
|
||||
- lint
|
||||
# - test
|
||||
|
Reference in New Issue
Block a user