浏览代码

travis run dusk

jqh 5 年之前
父节点
当前提交
5ede1cfbc7
共有 2 个文件被更改,包括 12 次插入11 次删除
  1. 3 3
      .travis.yml
  2. 9 8
      tests/ChromeProcess.php

+ 3 - 3
.travis.yml

@@ -35,12 +35,12 @@ install:
   - php artisan admin:publish --force
   - php artisan admin:install
   - php artisan migrate:rollback
-  # - php artisan dusk:chrome-driver
+  - php artisan dusk:chrome-driver
 
 before_script:
-#  - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9515 http://127.0.0.1 &
+  - google-chrome-stable --headless --disable-gpu –-no-sandbox --remote-debugging-port=9515 http://127.0.0.1 &
 #  - chmod 777 ./dcat-admin/tests/resources/drivers/chromedriver-linux
-  - google-chrome --headless –-no-sandbox --disable-gpu --remote-debugging-port=9515 http://127.0.0.1 &
+#  - google-chrome --headless –-no-sandbox --disable-gpu --remote-debugging-port=9515 http://127.0.0.1 &
   - php artisan serve &
 
 script:

+ 9 - 8
tests/ChromeProcess.php

@@ -12,14 +12,15 @@ class ChromeProcess extends BaseChromeProcess
 
         if ($this->onWindows()) {
             $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-win.exe');
-        } elseif ($this->onMac()) {
-            $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-mac');
-        } else {
-            if (is_file('/usr/bin/google-chrome')) {
-                $this->driver = '/usr/bin/google-chrome';
-            } else {
-                $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-linux');
-            }
         }
+        //elseif ($this->onMac()) {
+        //    $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-mac');
+        //} else {
+        //    if (is_file('/usr/bin/google-chrome')) {
+        //        $this->driver = '/usr/bin/google-chrome';
+        //    } else {
+        //        $this->driver = realpath(__DIR__.'/resources/drivers/chromedriver-linux');
+        //    }
+        //}
     }
 }