This repository has been archived by the owner on May 17, 2022. It is now read-only.
-
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.
- Loading branch information
Showing
2 changed files
with
102 additions
and
44 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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
version: 2.1 | ||
orbs: | ||
node: circleci/[email protected] | ||
aliases: | ||
- &restore-yarn-cache | ||
restore_cache: | ||
name: Restore yarn cache | ||
key: v2-node-{{ arch }}-{{ checksum "yarn.lock" }}-yarn | ||
|
||
- &save-yarn-cache | ||
# Store the yarn cache globally for all lock files with this same | ||
# checksum. This will speed up the setup job for all PRs where the | ||
# lockfile is the same. | ||
name: Save yarn cache for future installs | ||
key: v2-node-{{ arch }}-{{ checksum "yarn.lock" }}-yarn | ||
paths: | ||
- ~/.cache/yarn | ||
|
||
|
||
- &restore_node_modules | ||
restore_cache: | ||
name: Restore node_modules cache | ||
keys: | ||
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-node-modules | ||
|
||
|
||
|
||
executors: | ||
node-executor: | ||
docker: | ||
- image: cimg/node:17.3.1 | ||
working_directory: ~/pptx-renderer | ||
|
||
|
||
jobs: | ||
|
||
|
||
test: | ||
executor: | ||
name: node/default | ||
tag: '17.3.1' | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
check-cache: always | ||
pkg-manager: yarn-berry | ||
with-cache: false | ||
- run: | ||
command: yarn run test | ||
name: Run YARN tests | ||
|
||
lint: | ||
executor: | ||
name: node/default | ||
tag: '17.3.1' | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
check-cache: always | ||
pkg-manager: yarn-berry | ||
with-cache: false | ||
- run: | ||
command: yarn run lint | ||
name: Run YARN eslint | ||
|
||
|
||
|
||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- test | ||
- lint |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
node: circleci/[email protected] | ||
aliases: | ||
- &restore-yarn-cache | ||
restore_cache: | ||
|
@@ -27,52 +28,40 @@ aliases: | |
executors: | ||
node-executor: | ||
docker: | ||
- image: cimg/node:current | ||
- image: cimg/node:17.3.1 | ||
working_directory: ~/pptx-renderer | ||
|
||
|
||
jobs: | ||
setup: | ||
executor: node-executor | ||
steps: | ||
- checkout | ||
- run: | ||
name: Nodejs Version | ||
command: node --version | ||
- *restore-yarn-cache | ||
- run: | ||
name: Install Packages | ||
command: yarn install --immutable | ||
- run: yarn workspaces info | head -n -1 > workspace_info.txt | ||
- save_cache: *save-yarn-cache | ||
- save_cache: | ||
# Store node_modules for all jobs in this workflow so that they don't | ||
# need to each run a yarn install for each job. This will speed up | ||
# all jobs run on this branch with the same lockfile. | ||
name: Save node_modules cache | ||
# This cache key is per branch, a yarn install in setup is required. | ||
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-node-modules | ||
paths: | ||
- node_modules | ||
|
||
|
||
test: | ||
executor: node-executor | ||
executor: | ||
name: node/default | ||
tag: '17.3.1' | ||
steps: | ||
- checkout | ||
- run: yarn workspaces info | head -n -1 > workspace_info.txt | ||
- *restore-yarn-cache | ||
# Builds babel-standalone with the regular Babel config | ||
# data for a JS file that's several megabytes large is bound to fail. Here, | ||
# we just run the babel-standalone test separately. | ||
- run: yarn run test --ci | ||
- node/install-packages: | ||
check-cache: always | ||
pkg-manager: yarn-berry | ||
with-cache: false | ||
- run: | ||
command: yarn run test | ||
name: Run YARN tests | ||
|
||
eslint: | ||
executor: node-executor | ||
steps: | ||
lint: | ||
executor: | ||
name: node/default | ||
tag: '17.3.1' | ||
steps: | ||
- checkout | ||
- run: yarn workspaces info | head -n -1 > workspace_info.txt | ||
- *restore_node_modules | ||
- run: yarn run lint | ||
- node/install-packages: | ||
check-cache: always | ||
pkg-manager: yarn-berry | ||
with-cache: false | ||
- run: | ||
command: yarn run lint | ||
name: Run YARN eslint | ||
|
||
|
||
|
||
|
@@ -81,10 +70,5 @@ workflows: | |
version: 2 | ||
build_and_test: | ||
jobs: | ||
- setup | ||
- eslint: | ||
requires: | ||
- setup | ||
- test: | ||
requires: | ||
- setup | ||
- test | ||
- lint |