Selaa lähdekoodia

Switch to CircleCI 2.0 (#368)

Implement a real test matrix.
Danilo Bargen 7 vuotta sitten
vanhempi
commit
f33b7de1b7
3 muutettua tiedostoa jossa 46 lisäystä ja 17 poistoa
  1. 43 0
      .circleci/config.yml
  2. 3 1
      README.md
  3. 0 16
      circle.yml

+ 43 - 0
.circleci/config.yml

@@ -0,0 +1,43 @@
+version: 2
+
+references:
+  test-steps: &test-steps
+    - checkout
+    - restore_cache:
+        keys:
+          - v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
+    - run: npm install
+    - run: npm run build
+    - run: npm test
+    - save_cache:
+        key: v1-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
+        paths:
+          - node_modules
+
+jobs:
+  test-node8:
+    docker:
+      - image: circleci/node:8-browsers
+    steps: *test-steps
+  test-node9:
+    docker:
+      - image: circleci/node:9-browsers
+    steps: *test-steps
+  lint:
+    docker:
+      - image: circleci/node:8-browsers
+    steps:
+      - checkout
+      - restore_cache:
+          keys:
+            - v1-dependencies-test-node8-{{ arch }}-{{ checksum "package.json" }}
+      - run: npm install
+      - run: npm run lint
+
+workflows:
+  version: 2
+  build:
+    jobs:
+      - test-node8
+      - test-node9
+      - lint

+ 3 - 1
README.md

@@ -25,7 +25,9 @@ Whitepaper](https://threema.ch/en/blog/posts/threema-web-whitepaper).
 
 Threema Web is written using [TypeScript](https://www.typescriptlang.org/) and
 [AngularJS 1](https://www.angularjs.org/). Dependencies are managed with
-[npm](https://www.npmjs.com/).
+[npm](https://www.npmjs.com/). You currently need Node.js 8 or later to build
+Threema Web. (Note that Node.js is only a build dependency, the result is plain
+old client-side JavaScript.)
 
 Install development dependencies:
 

+ 0 - 16
circle.yml

@@ -1,16 +0,0 @@
-machine:
-  node:
-    version: v6.1.0
-  environment:
-    CIRCLECI: true
-
-compile:
-  override:
-    - npm rebuild node-sass
-    - npm run build
-
-test:
-  pre:
-    - echo "\$CIRCLECI is $CIRCLECI"
-  post:
-    - npm run lint