Skip to content

Speed up publishing dist on the CircleCI and testing bundles #5788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 8 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,8 @@ jobs:
steps:
- checkout
- run:
name: set heap option before very first node.js call
command: |
export NODE_OPTIONS='--max-old-space-size=4096'
- run:
name: Install dependencies
command: |
npm ci
- run:
name: List dependency versions
command: |
echo "npm: $(npm --version)"
echo "node: $(node --version)"
npm ls || true
name: set up build environment
command: .circleci/env_build.sh
- run:
name: Pretest
command: |
Expand Down Expand Up @@ -194,8 +183,10 @@ jobs:
- image: circleci/node:12.22.1
working_directory: ~/plotly.js
steps:
- attach_workspace:
at: ~/
- checkout
- run:
name: set up build environment
command: .circleci/env_build.sh
- run:
name: Build dist/
command: npm run build
Expand All @@ -219,18 +210,6 @@ jobs:
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
- persist_to_workspace:
root: ~/
paths:
- plotly.js

test-dist1:
docker:
- image: circleci/node:12.22.1
working_directory: ~/plotly.js
steps:
- attach_workspace:
at: ~/
- run:
name: Test plotly.min.js import using requirejs
command: npm run test-requirejs
Expand All @@ -240,20 +219,9 @@ jobs:
- run:
name: Test certain bundles against function constructors
command: npm run no-new-func

test-dist2:
docker:
- image: circleci/node:12.22.1
working_directory: ~/plotly.js
steps:
- attach_workspace:
at: ~/
- run:
name: Test plotly bundles against es6
command: npm run no-es6-dist
- run:
name: Test plotly bundles againt duplicate keys
command: npm run no-dup-keys

workflows:
version: 2
Expand Down Expand Up @@ -290,12 +258,5 @@ workflows:
- source-syntax:
requires:
- install-and-cibuild
- publish-dist:
requires:
- install-and-cibuild
- test-dist1:
requires:
- publish-dist
- test-dist2:
requires:
- publish-dist

- publish-dist
6 changes: 6 additions & 0 deletions .circleci/env_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
export NODE_OPTIONS='--max-old-space-size=4096' && \
echo "node version: $(node --version)" && \
echo "npm version: $(npm --version)" && \
npm ci && \
npm ls || true