From a38eaa058d0a89a689418001cb51a2d2c3458263 Mon Sep 17 00:00:00 2001
From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Date: Fri, 3 Jun 2022 17:06:02 +0200
Subject: [PATCH] [E2E] Simplify CircleCI Cypress workflow (#23123)

---
 .circleci/config.yml | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/.circleci/config.yml b/.circleci/config.yml
index fbd316af8df..6d0959a7765 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -908,6 +908,9 @@ jobs:
       test-files:
         type: string
         default: ""
+      grep:
+        type: string
+        default: ""
       qa-db:
         type: boolean
         default: false
@@ -944,6 +947,7 @@ jobs:
                   # Make both `test-files`,  `source-folder` and `currents-record` parameters optional. Translates to: if `parameter` => run associated flag (`--spec`, `--folder` and `--key $CURRENTS_KEY --record` respectively)
                 command: |
                   run test-cypress-run \
+                  <<# parameters.grep >> --env << parameters.grep >> <</ parameters.grep >> \
                   <<# parameters.test-files >> --spec << parameters.test-files >> <</ parameters.test-files >> \
                   <<# parameters.source-folder >> --folder << parameters.source-folder >> <</ parameters.source-folder >>
                 after-steps:
@@ -1249,7 +1253,7 @@ workflows:
       - fe-tests-cypress:
           matrix:
             parameters:
-              edition: ["ee", "oss"]
+              edition: ["ee"]
               folder:
                 [
                   "admin",
@@ -1276,6 +1280,22 @@ workflows:
             - run-snowplow-micro
             - wait-for-databases
 
+      - fe-tests-cypress:
+          matrix:
+            parameters:
+              edition: ["oss"]
+          name: e2e-tests-<< matrix.edition >>
+          requires:
+            - build-uberjar-<< matrix.edition >>
+            - snowplow-deps
+          cypress-group: e2e-tests-<< matrix.edition >>
+          grep: "grepTags=@OSS,grepFilterSpecs=true"
+          qa-db: true
+          snowplow: true
+          before-steps:
+            - run-snowplow-micro
+            - wait-for-databases
+
       - fe-tests-cypress:
           name: percy-visual-tests-<< matrix.edition >>
           requires:
-- 
GitLab