From df151d88a424c3cf793929f903c2f44d44e055fd Mon Sep 17 00:00:00 2001
From: Deluan <deluan@deluan.com>
Date: Wed, 15 Jan 2020 11:29:26 -0500
Subject: [PATCH] Add JS tests/build to pipeline. Removed invalid test

---
 .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++----
 ui/src/App.test.js       |  9 ---------
 2 files changed, 29 insertions(+), 13 deletions(-)
 delete mode 100644 ui/src/App.test.js

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7dc30c329..e10fd87f2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,8 +1,8 @@
 name: CI
 on: [push]
 jobs:
-  build:
-    name: Test on ${{ matrix.os }}
+  go:
+    name: Test Server on ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
@@ -19,8 +19,33 @@ jobs:
         uses: actions/checkout@v1
 
       - name: Download dependencies
-        run: |
-          go mod download
+        run: go mod download
 
       - name: Test
         run: go test -cover ./... -v
+
+  js:
+    name: Test UI
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v1
+      - uses: actions/setup-node@v1
+        with:
+          node-version: 12
+
+      - name: npm install dependencies
+        run: |
+          cd ui
+          npm ci
+
+# TODO: Enable when there are tests to run
+#      - name: npm test
+#        run: |
+#          cd ui
+#          CI=test npm test
+
+      - name: npm build
+        run: |
+          cd ui
+          npm run build
diff --git a/ui/src/App.test.js b/ui/src/App.test.js
deleted file mode 100644
index 4a863755f..000000000
--- a/ui/src/App.test.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import React from 'react'
-import { render } from '@testing-library/react'
-import App from './App'
-
-test('renders learn react link', () => {
-  const { getByText } = render(<App />)
-  const linkElement = getByText(/learn react/i)
-  expect(linkElement).toBeInTheDocument()
-})