From 1d99b2524967fa5ac3ac1c7c629fdc205d695383 Mon Sep 17 00:00:00 2001
From: Travis Ralston <travpc@gmail.com>
Date: Fri, 24 Jul 2020 22:30:05 -0600
Subject: [PATCH] Set up Circle CI for complement test running

---
 .circleci/config.yml | 16 ++++++++++++++++
 ci-complement.sh     |  5 +++++
 2 files changed, 21 insertions(+)
 create mode 100644 ci-complement.sh

diff --git a/.circleci/config.yml b/.circleci/config.yml
index f4ab6bba..f19c1da3 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,5 +1,21 @@
 version: 2
 jobs:
+  complement:
+    docker:
+      - image: circleci/golang:1.14
+        environment:
+          GO111MODULE: "on"
+          COMPLEMENT_BASE_IMAGE: complement-media-repo
+          COMPLEMENT_VERSION_CHECK_ITERATIONS: 400
+    steps:
+      - setup_remote_docker
+      - checkout
+      - run:
+          name: build complement image
+          command: 'docker build -t complement-media-repo -f Complement.Dockerfile .'
+      - run:
+          name: run complement
+          command: './ci-complement.sh'
   build:
     docker:
       - image: circleci/golang:1.14
diff --git a/ci-complement.sh b/ci-complement.sh
new file mode 100644
index 00000000..2b23a306
--- /dev/null
+++ b/ci-complement.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+git clone --depth=1 https://github.com/matrix-org/complement.git CI_COMPLEMENT
+cd CI_COMPLEMENT
+go test -run '^(TestMediaWithoutFileName)$' -v ./tests
-- 
GitLab