Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Commit

Permalink
#1 circleci from FB react
Browse files Browse the repository at this point in the history
  • Loading branch information
marcog83 committed Jan 13, 2022
1 parent 0dcdc8b commit c24fad0
Showing 1 changed file with 38 additions and 15 deletions.
53 changes: 38 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ version: 2.1

aliases:
- &restore-yarn-cache
key: v2-yarn-cache-{{ checksum "yarn.lock" }}
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:
- ~/.yarn/berry/cache
key: v2-yarn-cache-{{ checksum "yarn.lock" }}
- ~/.cache/yarn

- &artifact_pptx
path: ~/pptx-renderer/packages/renderer/pptx-renderer.min.js
Expand All @@ -25,23 +31,37 @@ executors:


jobs:
test-standalone:
setup:
executor: node-executor
steps:
- checkout
- restore_cache: *restore-yarn-cache
- run:
name: Nodejs Version
command: node --version
- *restore-yarn-cache
- run:
name: Install Packages
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- save_cache: *save-yarn-cache

test:
executor: node-executor
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 test
- store_artifacts: *artifact_pptx
- store_artifacts: *artifact_pptx_min
- save_cache: *save-yarn-cache
- run: yarn test --ci

eslint:
executor: node-executor
steps:
- checkout
- restore_cache: *restore-yarn-cache
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore-yarn-cache
- run: yarn lint
- save_cache: *save-yarn-cache

Expand All @@ -50,9 +70,12 @@ jobs:

workflows:
version: 2
test-standalone:
build_and_test:
jobs:
- test-standalone
eslint:
jobs:
- eslint
- setup
- eslint:
requires:
- setup
-test:
requires:
- setup

0 comments on commit c24fad0

Please sign in to comment.