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
1 changed file
with
36 additions
and
25 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 |
---|---|---|
@@ -1,38 +1,49 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/2.0/configuration-reference | ||
version: 2.1 | ||
|
||
orbs: | ||
# The Node.js orb contains a set of prepackaged CircleCI configuration you can utilize | ||
# Orbs reduce the amount of configuration required for common tasks. | ||
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/node | ||
node: circleci/[email protected] | ||
aliases: | ||
- &restore-yarn-cache | ||
key: v2-yarn-cache-{{ checksum "yarn.lock" }} | ||
|
||
- &save-yarn-cache | ||
paths: | ||
- ~/.yarn/berry/cache | ||
key: v2-yarn-cache-{{ checksum "yarn.lock" }} | ||
|
||
- &artifact_babel | ||
path: ~/ppxt-renderer/packages/renderer/ppxt-renderer.min.js | ||
|
||
- &artifact_babel_min | ||
path: ~/ppxt-renderer/packages/renderer/ppxt-renderer.min.js | ||
|
||
|
||
|
||
executors: | ||
node-executor: | ||
docker: | ||
- image: cimg/node:current | ||
working_directory: ~/pptx-renderer | ||
working_directory: ~/ppxt-renderer | ||
|
||
|
||
|
||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs | ||
jobs: | ||
test: | ||
executor: node-executor | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#steps | ||
build-standalone: | ||
executor: node-executor | ||
steps: | ||
- node/install-packages: | ||
pkg-manager: yarn | ||
- run: | ||
name: Run tests | ||
command: npm test | ||
|
||
# Invoke jobs via workflows | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows | ||
- checkout | ||
- restore_cache: *restore-yarn-cache | ||
# Builds babel-standalone with the regular Babel config | ||
# test-ci-coverage doesn't test babel-standalone, as trying to gather coverage | ||
# - run: IS_PUBLISH=true make -j build-standalone-ci | ||
# 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_ppxt | ||
- store_artifacts: *artifact_ppxt_min | ||
- save_cache: *save-yarn-cache | ||
|
||
|
||
|
||
workflows: | ||
test-workflow: | ||
version: 2 | ||
build-standalone: | ||
jobs: | ||
- test | ||
- build-standalone |