Merge pull request #726 from mathquill/ci.link-many-worlds

CI: Add Many-Worlds build link to Commit Status
diff --git a/circle.yml b/circle.yml
index 331b639..6bcd75a 100644
--- a/circle.yml
+++ b/circle.yml
@@ -65,6 +65,17 @@
 
 test:
   pre:
+    - |-
+      # Generate link to Many-Worlds build and add to GitHub Commit Status
+      curl -i -X POST https://api.github.com/repos/mathquill/mathquill/statuses/$CIRCLE_SHA1 \
+           -u MathQuillBot:$GITHUB_STATUS_API_KEY \
+           -d '{
+                 "context": "ci/many-worlds",
+                 "state": "success",
+                 "description": "Try the tests on the Many-Worlds build of this commit:",
+                 "target_url": "http://many-worlds.glitch.me/mathquill/mathquill/commit/'$CIRCLE_SHA1'/test/"
+               }'
+
     # Safari on Sauce can only connect to port 3000, 4000, 7000, or 8000. Edge needs port 7000 or 8000.
     # https://david263a.wordpress.com/2015/04/18/fixing-safari-cant-connect-to-localhost-issue-when-using-sauce-labs-connect-tunnel/
     # https://support.saucelabs.com/customer/portal/questions/14368823-requests-to-localhost-on-microsoft-edge-are-failing-over-sauce-connect
@@ -148,7 +159,8 @@
                  "framework": "mocha",
                  "url": "http://localhost:8000/test/unit.html?post_xunit_to=http://localhost:9000",
                  "platforms": [["", "Chrome", ""]]
-      }' | tee /dev/stderr | tail -1 > js-tests.json
+               }' \
+      | tee /dev/stderr | tail -1 > js-tests.json
 
       echo '2. Wait for tests to finish:'
       echo