Skip to content

Commit 3b74c8a

Browse files
[upgraded] to CircleCI v2
Summary: config.yml copied from material-motion-js Reviewers: O2 Material Motion, #material_motion Tags: #material_motion Differential Revision: http://codereview.cc/D3473
1 parent 246e4d5 commit 3b74c8a

4 files changed

Lines changed: 148 additions & 24 deletions

File tree

.circleci/config.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# This configuration was automatically generated from a CircleCI 1.0 config.
2+
# It should include any build commands you had along with commands that CircleCI
3+
# inferred from your project structure. We strongly recommend you read all the
4+
# comments in this file to understand the structure of CircleCI 2.0, as the idiom
5+
# for configuration has changed substantially in 2.0 to allow arbitrary jobs rather
6+
# than the prescribed lifecycle of 1.0. In general, we recommend using this generated
7+
# configuration as a reference rather than using it in production, though in most
8+
# cases it should duplicate the execution of your original 1.0 config.
9+
version: 2
10+
jobs:
11+
build:
12+
working_directory: ~/material-motion/indefinite-observable-js
13+
parallelism: 1
14+
shell: /bin/bash --login
15+
# CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did.
16+
# If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables .
17+
environment:
18+
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
19+
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
20+
# In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages.
21+
# In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images.
22+
# The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job.
23+
# We have selected a pre-built image that mirrors the build environment we use on
24+
# the 1.0 platform, but we recommend you choose an image more tailored to the needs
25+
# of each job. For more information on choosing an image (or alternatively using a
26+
# VM instead of a container) see https://circleci.com/docs/2.0/executor-types/
27+
# To see the list of pre-built images that CircleCI provides for most common languages see
28+
# https://circleci.com/docs/2.0/circleci-images/
29+
docker:
30+
- image: circleci/node:10-stretch-browsers
31+
steps:
32+
# Machine Setup
33+
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
34+
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
35+
- checkout
36+
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
37+
# In many cases you can simplify this from what is generated here.
38+
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
39+
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS/tslint/ $CIRCLE_TEST_REPORTS/mocha/
40+
# Dependencies
41+
# This would typically go in either a build or a build-and-test job when using workflows
42+
# Restore the dependency cache
43+
- restore_cache:
44+
keys:
45+
# This branch if available
46+
- node10-{{ .Branch }}-
47+
# Default branch if not
48+
- node10-develop-
49+
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
50+
- node10-
51+
52+
# set default yarn installation's install path
53+
- run: yarn config set prefix "$HOME/.yarn"
54+
- run: PATH=$( yarn global bin ):$PATH
55+
56+
- run: yarn
57+
58+
# Save dependency cache
59+
- save_cache:
60+
key: node10-{{ .Branch }}-{{ epoch }}
61+
paths:
62+
- ~/.cache/yarn
63+
- ./node_modules
64+
65+
# yarn will lint separately as part of pretest, but we're running it manually to get the output piped into Circle
66+
- run:
67+
name: Run linter
68+
command: yarn run lint --out $CIRCLE_TEST_REPORTS/tslint/core.xml --formatters-dir ./node_modules/tslint-junit-formatter/formatters --format junit
69+
when: always
70+
71+
# Test
72+
# This would typically be a build job when using workflows, possibly combined with build
73+
# This is based on your 1.0 configuration file or project settings
74+
- run:
75+
name: Run unit tests
76+
command: yarn run test --reporter mocha-junit-reporter --reporter-options mochaFile=$CIRCLE_TEST_REPORTS/mocha/test-results.xml
77+
when: always
78+
79+
# Teardown
80+
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
81+
# Save test results
82+
- store_test_results:
83+
path: /tmp/circleci-test-results
84+
# Save artifacts
85+
- store_artifacts:
86+
path: /tmp/circleci-artifacts
87+
- store_artifacts:
88+
path: /tmp/circleci-test-results
89+
90+
# From http://codereview.cc/harbormaster/step/edit/6/
91+
#
92+
# This was from CircleCI v1, but Internet comments lead me to believe it's
93+
# unofficially still supported in Circle v2.
94+
notify:
95+
webhooks:
96+
- url: http://codereview.cc/harbormaster/hook/circleci/
97+

circle.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
"types": "dist/index.d.ts",
1616
"typescript:main": "src/index.ts",
1717
"dependencies": {
18-
"symbol-observable": "1.0.4"
18+
"mocha-junit-reporter": "^1.18.0",
19+
"symbol-observable": "1.0.4",
20+
"tslint-junit-formatter": "^5.1.0"
1921
},
2022
"devDependencies": {
2123
"chai": "3.5.0",

yarn.lock

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ ansi-regex@^2.0.0:
3535
version "2.0.0"
3636
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107"
3737

38+
ansi-regex@^3.0.0:
39+
version "3.0.0"
40+
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
41+
3842
ansi-styles@^2.2.1:
3943
version "2.2.1"
4044
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
@@ -430,6 +434,10 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1:
430434
strip-ansi "^3.0.0"
431435
supports-color "^2.0.0"
432436

437+
charenc@~0.0.1:
438+
version "0.0.2"
439+
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
440+
433441
chokidar@^1.6.0:
434442
version "1.6.1"
435443
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2"
@@ -622,6 +630,10 @@ cross-spawn@^4:
622630
lru-cache "^4.0.1"
623631
which "^1.2.9"
624632

633+
crypt@~0.0.1:
634+
version "0.0.2"
635+
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
636+
625637
cryptiles@2.x.x:
626638
version "2.0.5"
627639
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
@@ -1240,6 +1252,10 @@ is-buffer@^1.0.2:
12401252
version "1.1.4"
12411253
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b"
12421254

1255+
is-buffer@~1.1.1:
1256+
version "1.1.6"
1257+
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
1258+
12431259
is-builtin-module@^1.0.0:
12441260
version "1.0.0"
12451261
resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
@@ -1579,6 +1595,14 @@ md5-o-matic@^0.1.1:
15791595
version "0.1.1"
15801596
resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3"
15811597

1598+
md5@^2.1.0:
1599+
version "2.2.1"
1600+
resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9"
1601+
dependencies:
1602+
charenc "~0.0.1"
1603+
crypt "~0.0.1"
1604+
is-buffer "~1.1.1"
1605+
15821606
media-typer@0.3.0:
15831607
version "0.3.0"
15841608
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -1660,6 +1684,16 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
16601684
dependencies:
16611685
minimist "0.0.8"
16621686

1687+
mocha-junit-reporter@^1.18.0:
1688+
version "1.18.0"
1689+
resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-1.18.0.tgz#9209a3fba30025ae3ae5e6bfe7f9c5bc3c2e8ee2"
1690+
dependencies:
1691+
debug "^2.2.0"
1692+
md5 "^2.1.0"
1693+
mkdirp "~0.5.1"
1694+
strip-ansi "^4.0.0"
1695+
xml "^1.0.0"
1696+
16631697
mocha-sugar-free@1.3.1:
16641698
version "1.3.1"
16651699
resolved "https://registry.yarnpkg.com/mocha-sugar-free/-/mocha-sugar-free-1.3.1.tgz#af7b6cacb77e02e26d4a80842c96252796d653c7"
@@ -2508,6 +2542,12 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1:
25082542
dependencies:
25092543
ansi-regex "^2.0.0"
25102544

2545+
strip-ansi@^4.0.0:
2546+
version "4.0.0"
2547+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
2548+
dependencies:
2549+
ansi-regex "^3.0.0"
2550+
25112551
strip-bom@^2.0.0:
25122552
version "2.0.0"
25132553
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
@@ -2606,6 +2646,10 @@ tsickle@0.2.0:
26062646
source-map "^0.5.6"
26072647
source-map-support "^0.4.2"
26082648

2649+
tslint-junit-formatter@^5.1.0:
2650+
version "5.1.0"
2651+
resolved "https://registry.yarnpkg.com/tslint-junit-formatter/-/tslint-junit-formatter-5.1.0.tgz#afd2071466227aad41c044191bbd1c6f9ba7541e"
2652+
26092653
tslint@4.0.2:
26102654
version "4.0.2"
26112655
resolved "https://registry.yarnpkg.com/tslint/-/tslint-4.0.2.tgz#d43f24c0c1f826de7f3a097bb7808a8b4325feac"
@@ -2837,6 +2881,10 @@ xdg-basedir@^2.0.0:
28372881
dependencies:
28382882
os-homedir "^1.0.0"
28392883

2884+
xml@^1.0.0:
2885+
version "1.0.1"
2886+
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
2887+
28402888
xtend@^4.0.0:
28412889
version "4.0.1"
28422890
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"

0 commit comments

Comments
 (0)