From d28cdbadceb5061e877b77acb2ee7c506be3b0fe Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 10 Jun 2019 15:56:00 -0400
Subject: [PATCH] Try to collect some test coverage

Of course there is no test suite yet but don't mind that.
---
 .circleci/config.yml   | 22 ++++++++++++++++++++++
 requirements-tests.txt | 13 +++++++++++++
 requirements.txt       |  2 ++
 3 files changed, 37 insertions(+)
 create mode 100644 requirements-tests.txt
 create mode 100644 requirements.txt

diff --git a/.circleci/config.yml b/.circleci/config.yml
index 99fc0e6..a6a03fa 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -34,9 +34,31 @@ jobs:
           path: "docs/build"
           destination: "docs"
 
+  tests:
+    docker:
+      - image: "circleci/python:3.7"
+    steps:
+      - "checkout"
+
+      - run:
+        name: "Run Test Suite"
+        command: |
+            virtualenv venv
+            . venv/bin/activate
+            pip install --upgrade pip
+            pip install -r requirements.txt requirements-tests.txt
+            coverage run -m twisted.trial _secureaccesstokenauthorizer
+
+      - run:
+        name: "Report Coverage"
+        command: |
+          . venv/bin/activate
+          CODECOV_TOKEN="cc6e4697-4337-4506-88af-92b8f8ca6b22" codecov
+
 
 workflows:
   version: 2
   everything:
     jobs:
       - "documentation"
+      - "tests"
diff --git a/requirements-tests.txt b/requirements-tests.txt
new file mode 100644
index 0000000..a10336e
--- /dev/null
+++ b/requirements-tests.txt
@@ -0,0 +1,13 @@
+# Pinned version of all test-only dependencies, direct and transitive.  These
+# are in addition to the dependencies in requirements.txt.  This is the
+# configuration tested on CI.
+chardet==3.0.4
+codecov==2.0.15
+coverage==4.5.3
+idna==2.8
+requests==2.22.0
+urllib3==1.25.3
+
+# As an exception, certifi may float.  It contains time-sensitive data
+# (certificates).  Pinning it guarantees a failure eventually.
+certifi
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..54c2b2e
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+# Pinned version of all dependencies, direct and transitive, needed at
+# runtime.  This is the configuration tested on CI.
-- 
GitLab