From 6ec336fd45c98265b538b89eb6a32dd3328a39f0 Mon Sep 17 00:00:00 2001
From: Ariya Hidayat <ariya@metabase.com>
Date: Wed, 28 Apr 2021 09:27:56 -0700
Subject: [PATCH] Use GitHub Actions to run smoke tests (#15792)

---
 .circleci/config.yml          | 62 -----------------------------------
 .github/workflows/uberjar.yml | 40 ++++++++++++++++++++++
 2 files changed, 40 insertions(+), 62 deletions(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index e5df5617eb2..71077e651d7 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -912,31 +912,6 @@ jobs:
                   - store_test_results:
                       path: cypress/results
 
-  fe-tests-cypress-smoketest:
-    parameters:
-      e:
-        type: executor
-        default: clojure-and-node-and-browsers
-      cypress-group:
-        type: string
-      <<: *Params
-    executor: << parameters.e >>
-    environment:
-      CYPRESS_GROUP: << parameters.cypress-group >>
-      DISPLAY: ""
-    steps:
-      - run-yarn-command:
-          command-name: Run Cypress tests
-          command: run test-cypress-smoketest
-          before-steps:
-            - restore_cache:
-                name: Restore cached uberjar built in previous step
-                <<: *CacheKeyUberjar
-      - store_artifacts:
-          path: /home/circleci/metabase/metabase/cypress
-      - store_test_results:
-          path: cypress/results
-
 
 ########################################################################################################################
 #                                                      WORKFLOWS                                                       #
@@ -1248,40 +1223,3 @@ workflows:
                 port: 3306
           <<: *Matrix
 
-  nightly:
-    triggers:
-      - schedule:
-          cron: "0 9 * * *"
-          filters:
-            branches:
-              only:
-                - master
-                - /release-*/
-    jobs:
-      - checkout
-
-      - be-deps:
-          requires:
-            - checkout
-
-      - fe-deps:
-          requires:
-            - checkout
-
-      # Build the OSS version of the uberjar.
-      - build-uberjar-drivers:
-          requires:
-            - be-deps
-      - build-uberjar-frontend:
-          requires:
-            - fe-deps
-      - build-uberjar:
-          requires:
-            - build-uberjar-drivers
-            - build-uberjar-frontend
-
-      - fe-tests-cypress-smoketest:
-          name: fe-tests-cypress-smoketest
-          requires:
-            - build-uberjar
-          cypress-group: "default"
diff --git a/.github/workflows/uberjar.yml b/.github/workflows/uberjar.yml
index 178f4edddbc..d8f0b3763ce 100644
--- a/.github/workflows/uberjar.yml
+++ b/.github/workflows/uberjar.yml
@@ -104,3 +104,43 @@ jobs:
     - name: Check API health
       run: curl -s localhost:3000/api/health
 
+  smoke:
+    runs-on: ubuntu-20.04
+    timeout-minutes: 30
+    needs: build
+    steps:
+    - uses: actions/checkout@v2
+    - name: Prepare Node.js
+      uses: actions/setup-node@v1
+      with:
+        node-version: 14.x
+    - name: Prepare JDK 8
+      uses: actions/setup-java@v1
+      with:
+        java-version: 8
+    - name: Install Clojure CLI
+      run: |
+        curl -O https://download.clojure.org/install/linux-install-1.10.1.708.sh &&
+        sudo bash ./linux-install-1.10.1.708.sh
+    - name: Check versions
+      run: |
+        echo "Node.js `node --version`"
+        echo "yarn `yarn --version`"
+        java -version
+        echo "Clojure `clojure -e "(println (clojure-version))"`"
+    - name: Get yarn cache
+      uses: actions/cache@v2
+      with:
+        path: ~/.cache/yarn
+        key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+
+    - run: ./bin/build version
+
+    - uses: actions/download-artifact@v2
+      name: Retrieve uberjar artifact
+      with:
+        name: metabase-oss-uberjar
+    - run: yarn run test-cypress-smoketest
+      name: Run Cypress smoketest
+      env:
+        TERM: xterm
\ No newline at end of file
-- 
GitLab