From eba7c8e6b7d294ccaa8d99b063918e2959f698f5 Mon Sep 17 00:00:00 2001
From: Recolic Keghart <root@recolic.net>
Date: Sat, 6 Apr 2019 00:25:14 -0700
Subject: [PATCH] add testing result to markdown

---
 .gitlab-ci.yml | 3 +++
 README.md      | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7742c73..4ac92f0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,6 +26,9 @@ test-assignment:
     - build-jdk8
   script:
     - ./run.sh ass
+    - ./run.sh ass 2>/dev/null | grep 'Tests:' > /tmp/result.log
+    - curl -G 'http://api.img4me.com/?font=firacode&fcolor=000000&size=10&bcolor=FFFFFF&type=png' --data-urlencode "text=$(cat /tmp/result.log)" > /tmp/good_png
+    - curl "https://git.recolic.net/_r_testing/set/cs164_proj2_test|$(cat /tmp/good_png)"
 
 test-positive-whole:
   stage: test
diff --git a/README.md b/README.md
index d217f31..b8f1ca5 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,10 @@
 [PA2 Specification]: http://inst.eecs.berkeley.edu/~cs164/sp19/hw/PA2.pdf
 [ChocoPy Specification]: http://inst.eecs.berkeley.edu/~cs164/sp19/chocopy_language_reference.pdf
 
+## Current testing result:
+
+![](https://git.recolic.net/_r_testing/redirect_to_val/cs164_proj2_test|http://img4me.com/dXlRzPa0.png)
+
 ## Getting started
 
 Run the following command to build your semantic analysis, and then run all the provided tests:
-- 
GitLab