Skip to content
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

Add dist files, bundler integration tests #74

Closed
wants to merge 2 commits into from
Closed
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
221 changes: 174 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,177 @@
version: 2.0
jobs:
build-node-11: &default

references:

node11: &node11image
docker:
- image: circleci/node:11
steps:
- checkout # special step to check out source code to working directory
- run:
name: Update npm
command: 'sudo npm install -g npm@latest'
- restore_cache: # special step to restore the dependency cache
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Install npm
command: npm install
- save_cache: # special step to save the dependency cache
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: Git Submodule Update
command: git submodule update --init --recursive
- run:

node10: &node10image
docker:
- image: circleci/node:10

node9: &node9image
docker:
- image: circleci/node:9

node8: &node8image
docker:
- image: circleci/node:8

node7: &node7image
docker:
- image: circleci/node:7

node11browser: &node11browsersimage
docker:
- image: circleci/node:11-browsers

node10browser: &node10browsersimage
docker:
- image: circleci/node:10-browsers

node9browser: &node9browsersimage
docker:
- image: circleci/node:9-browsers

node8browser: &node8browsersimage
docker:
- image: circleci/node:8-browsers

node7browser: &node7browsersimage
docker:
- image: circleci/node:7-browsers

install_npm_default: &install_npm
run:
name: Update npm
command: 'sudo npm install -g npm@latest'
restore_cache_default: &restore_cache # special step to restore the dependency cache
restore_cache:
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
key: dependency-cache-{{ checksum "package.json" }}
install_npm_packages_default: &install_npm_packages
run:
name: Install npm packages
command: npm install
save_cache_default: &save_cache # special step to save the dependency cache
save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
update_realm_submodule_default: &update_realm_submodule
run:
name: Git Submodule Update
command: git submodule update --init --recursive


jobs:

# Lint and Test

lint_and_test_node_11: &lint_and_test
<<: *node11image
steps:
- checkout
- *update_realm_submodule
- *install_npm
- *restore_cache
- *install_npm_packages
- *save_cache
- run: &lint
name: Lint
command: npm run lint-check
- run:
- run: &test
name: Test
command: npm test
build-node-10:
<<: *default
docker:
- image: circleci/node:10
# build-node-9:
# <<: *default
# docker:
# - image: circleci/node:9
# build-node-8:
# <<: *default
# docker:
# - image: circleci/node:8
# build-node-7:
# <<: *default
# docker:
# - image: circleci/node:7

lint_and_test_node_10:
<<: *lint_and_test
<<: *node10image

lint_and_test_node_9:
<<: *lint_and_test
<<: *node9image

lint_and_test_node_8:
<<: *lint_and_test
<<: *node8image

lint_and_test_node_7:
<<: *lint_and_test
<<: *node7image

# Pre-Release Test Integration

pre_release_test_integration_node_11: &pre_release_test_integration
<<: *node11browsersimage
steps:
- checkout
- *update_realm_submodule
- *install_npm
- *restore_cache
- *install_npm_packages
- *save_cache
- run:
name: Build browser tests and bundle
command: ./integration-test/scripts/build-pre-release-test.sh
- run:
name: Test bundles
command: |
cd integration-test
npm run test:pre-release

pre_release_test_integration_node_10:
<<: *pre_release_test_integration
<<: *node10browsersimage

pre_release_test_integration_node_9:
<<: *pre_release_test_integration
<<: *node9browsersimage

pre_release_test_integration_node_8:
<<: *pre_release_test_integration
<<: *node8browsersimage

pre_release_test_integration_node_7:
<<: *pre_release_test_integration
<<: *node7browsersimage

# Post-Release Test Integration

post_release_test_integration_node_11: &post_release_test_integration
<<: *node11browsersimage
steps:
- checkout
- *update_realm_submodule
- *install_npm
- *restore_cache
- *install_npm_packages
- *save_cache
- run:
name: Build browser tests
command: ./integration-test/scripts/build-post-release-test.sh
- run:
name: Test unpkg
command: |
cd integration-test
npm run test:post-release

post_release_test_integration_node_10:
<<: *post_release_test_integration
<<: *node10browsersimage

post_release_test_integration_node_9:
<<: *post_release_test_integration
<<: *node9browsersimage

post_release_test_integration_node_8:
<<: *post_release_test_integration
<<: *node8browsersimage

post_release_test_integration_node_7:
<<: *post_release_test_integration
<<: *node7browsersimage

npm_audit_node_11: &npm_audit
docker:
Expand All @@ -67,14 +195,12 @@ jobs:

workflows:
version: 2
test-all-versions:
test_all:
jobs:
# - build-node-7
# - build-node-8
# - build-node-9
- build-node-10
- build-node-11

- lint_and_test_node_11
- lint_and_test_node_10
- pre_release_test_integration_node_11
- pre_release_test_integration_node_10
nightly:
triggers:
- schedule:
Expand All @@ -84,5 +210,6 @@ workflows:
only:
- master
jobs:
- npm_audit_node_11

- npm_audit_node_11
- post_release_test_integration_node_11
- post_release_test_integration_node_10
9 changes: 7 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Proposal Realms
/proposal-realms

/dist/ses-shim.js
/dist/ses-shim.js.map
/dist/
/src/stringifiedBundle
/src/old/
/demo/
/scripts/

/integration-test/.cache/
/integration-test/bundles/
/integration-test/node_modules/
/integration-test/transform-tests/
/integration-test/scripts/
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ typings/
# dotenv environment variables file
.env

/dist

integration-test/.cache
integration-test/bundles
integration-test/transform-tests/output
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Testing SES</title>
<script src="../dist/ses-shim.js"></script>
<script src="../dist/ses.umd.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118217811-2"></script>
Expand Down
Loading