-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refactor] Remove use of circleci/node Orb until CircleCI-Public/node…
…-orb#217 is addressed
- Loading branch information
1 parent
305c3cc
commit 2dcee2a
Showing
1 changed file
with
53 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,95 +7,94 @@ parameters: | |
resource-class: | ||
type: string | ||
default: "small" | ||
pkg-manager: | ||
yarn-version: | ||
type: string | ||
default: "yarn-berry" | ||
pkg-cache-version: | ||
type: string | ||
default: "v4" | ||
default: "4.2.2" | ||
|
||
orbs: | ||
node: circleci/[email protected] | ||
coveralls: coveralls/[email protected] | ||
|
||
commands: | ||
install-yarn: | ||
description: "Install Yarn" | ||
steps: | ||
- run: corepack enable | ||
- run: yarn set version << pipeline.parameters.yarn-version >> | ||
install-dependencies: | ||
description: "Install Dependencies" | ||
steps: | ||
- run: yarn install | ||
|
||
jobs: | ||
clone-and-install: | ||
docker: | ||
- image: cimg/node:<< pipeline.parameters.node-image-tag >> | ||
resource_class: << pipeline.parameters.resource-class >> | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
check-cache: always | ||
cache-version: << pipeline.parameters.pkg-cache-version >> | ||
pkg-manager: << pipeline.parameters.pkg-manager >> | ||
with-cache: false | ||
- install-yarn | ||
- install-dependencies | ||
coverage: | ||
docker: | ||
- image: cimg/node:<< pipeline.parameters.node-image-tag >> | ||
resource_class: << pipeline.parameters.resource-class >> | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
check-cache: always | ||
cache-version: << pipeline.parameters.pkg-cache-version >> | ||
pkg-manager: << pipeline.parameters.pkg-manager >> | ||
with-cache: false | ||
- install-yarn | ||
- install-dependencies | ||
- run: | ||
name: Run Code Coverage | ||
command: yarn coverage | ||
- run: | ||
name: Create Code Coverage lcov file | ||
name: Generate Code Coverage lcov File | ||
command: yarn run nyc --reporter=text-lcov report > coverage.lcov | ||
- coveralls/upload: | ||
coverage_file: coverage.lcov | ||
lint: | ||
docker: | ||
- image: cimg/node:<< pipeline.parameters.node-image-tag >> | ||
resource_class: << pipeline.parameters.resource-class >> | ||
steps: | ||
- install-yarn | ||
- install-dependencies | ||
- run: | ||
name: Lint | ||
command: yarn lint | ||
|
||
generate-docs: | ||
docker: | ||
- image: cimg/node:<< pipeline.parameters.node-image-tag >> | ||
resource_class: << pipeline.parameters.resource-class >> | ||
steps: | ||
- install-yarn | ||
- install-dependencies | ||
- run: | ||
name: Generate Docs | ||
command: yarn generate-docs | ||
|
||
run-example: | ||
docker: | ||
- image: cimg/node:<< pipeline.parameters.node-image-tag >> | ||
resource_class: << pipeline.parameters.resource-class >> | ||
steps: | ||
- install-yarn | ||
- install-dependencies | ||
- run: | ||
name: Run Example | ||
command: yarn example | ||
|
||
workflows: | ||
build-and-test: | ||
jobs: | ||
- clone-and-install | ||
- node/run: | ||
name: lint | ||
- lint: | ||
requires: | ||
- clone-and-install | ||
version: << pipeline.parameters.node-image-tag >> | ||
resource_class: << pipeline.parameters.resource-class >> | ||
pkg-manager: << pipeline.parameters.pkg-manager >> | ||
setup: | ||
- node/install-packages: | ||
check-cache: always | ||
cache-version: << pipeline.parameters.pkg-cache-version >> | ||
pkg-manager: << pipeline.parameters.pkg-manager >> | ||
with-cache: false | ||
yarn-run: lint | ||
- coverage: | ||
requires: | ||
- clone-and-install | ||
- node/run: | ||
name: generate docs | ||
- generate-docs: | ||
requires: | ||
- clone-and-install | ||
version: << pipeline.parameters.node-image-tag >> | ||
resource_class: << pipeline.parameters.resource-class >> | ||
pkg-manager: << pipeline.parameters.pkg-manager >> | ||
setup: | ||
- node/install-packages: | ||
check-cache: always | ||
cache-version: << pipeline.parameters.pkg-cache-version >> | ||
pkg-manager: << pipeline.parameters.pkg-manager >> | ||
with-cache: false | ||
yarn-run: generate-docs | ||
- node/run: | ||
name: run example | ||
- run-example: | ||
requires: | ||
- clone-and-install | ||
version: << pipeline.parameters.node-image-tag >> | ||
resource_class: << pipeline.parameters.resource-class >> | ||
pkg-manager: << pipeline.parameters.pkg-manager >> | ||
setup: | ||
- node/install-packages: | ||
check-cache: always | ||
cache-version: << pipeline.parameters.pkg-cache-version >> | ||
pkg-manager: << pipeline.parameters.pkg-manager >> | ||
with-cache: false | ||
yarn-run: example |