]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
ci: skip e2e bs tests
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 5 Aug 2021 10:54:31 +0000 (12:54 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 5 Aug 2021 10:54:31 +0000 (12:54 +0200)
circle.yml
e2e/runner.js
e2e/vite.config.js

index 402562287fa0034ddfa1f49d26bfc60f131cd7d0..05c3c20efac8ea8bf4396b7204ce21a1fae42ac5 100644 (file)
@@ -55,6 +55,8 @@ jobs:
       - attach_workspace:
           at: ~/project
       - run: yarn test:e2e:bs
+      - store_artifacts:
+          path: e2e/screenshots
       - store_test_results:
           path: e2e/reports
 
@@ -100,15 +102,18 @@ workflows:
       - test-e2e:
           requires:
             - install
-      - test-e2e-bs:
+      - build-lint:
           requires:
             - install
+      # - build-e2e:
+      #     requires:
+      #       - install
+      # - test-e2e-bs:
+      #     requires:
+      #       - build-e2e
       - test-unit:
           requires:
             - install
-      - build-lint:
-          requires:
-            - install
       - coverage:
           requires:
             - test-unit
index 3bd8746c355e279f06141d7c67012ff373c42294..9abea45b6e7b84aeb4736868df0ce2361dee2392 100644 (file)
@@ -26,6 +26,20 @@ const { resolve } = require('path')
 const Nightwatch = require('nightwatch')
 const args = process.argv.slice(2)
 
+// allow running browserstack local
+const isLocal = args.indexOf('--local') > -1
+
+if (isLocal && (!process.env.BS_USER || !process.env.BS_KEY)) {
+  console.log(
+    'Hey!\n',
+    'You are missing credentials for Browserstack.\n',
+    'If you are a contributor, this is normal, credentials are private. These tests must be run by a maintainer of vue-router',
+    'If you are a maintainer, make sure to create your `.env` file with both `BS_USER` and `BS_KEY` variables!'
+  )
+  // fail if testing locally
+  process.exit(process.env.CI ? 0 : 1)
+}
+
 // if we are running yarn dev locally, we can pass --dev to avoid launching another server instance
 const server =
   args.indexOf('--dev') > -1
@@ -34,9 +48,6 @@ const server =
       // ? require('./staticServer')
       require('./devServer')
 
-// allow running browserstack local
-const isLocal = args.indexOf('--local') > -1
-
 const DEFAULT_CONFIG = './nightwatch.json'
 const NW_CONFIG = isLocal
   ? resolve(__dirname, './nightwatch.browserstack.js')
@@ -86,17 +97,6 @@ process.mainModule.filename = resolve(
 )
 
 if (isLocal) {
-  if (isLocal && (!process.env.BS_USER || !process.env.BS_KEY)) {
-    console.log(
-      'Hey!\n',
-      'You are missing credentials for Browserstack.\n',
-      'If you are a contributor, this is normal, credentials are private. These tests must be run by a maintainer of vue-router',
-      'If you are a maintainer, make sure to create your `.env` file with both `BS_USER` and `BS_KEY` variables!'
-    )
-    // fail if testing locally
-    process.exit(process.env.CI ? 0 : 1)
-  }
-
   let bsLocal
   const browserstack = require('browserstack-local')
   Nightwatch.bs_local = bsLocal = new browserstack.Local()
index d6e47bff159784a1d4ee5f965a4b564d845aac2a..2755f979921b5a18ced7c84626f1887fd73977df 100644 (file)
@@ -1,8 +1,8 @@
-import fs from 'fs'
-import { resolve, join } from 'path'
-import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
-import history from 'connect-history-api-fallback'
+const fs = require('fs')
+const { resolve, join } = require('path')
+const { defineConfig } = require('vite')
+const vue = require('@vitejs/plugin-vue')
+const history = require('connect-history-api-fallback')
 
 /** @type {string[]} */
 let examples = []