feat:driver check
This commit is contained in:
parent
316c72adae
commit
0d66ba0765
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@ -29,16 +29,29 @@ jobs:
|
||||
python-version: '3.8'
|
||||
update-environment: true
|
||||
cache: 'pipenv'
|
||||
- name: Check open_driver config
|
||||
id: check_driver
|
||||
run: |
|
||||
echo "OPEN_DRIVER=$(python -c '
|
||||
try:
|
||||
import config
|
||||
except ImportError:
|
||||
import user_config as config
|
||||
print(config.open_driver)')" >> $GITHUB_ENV
|
||||
- name: Install Selenium
|
||||
if: env.OPEN_DRIVER == 'True'
|
||||
run: |
|
||||
sudo pip3 install selenium
|
||||
- name: Set up Chrome
|
||||
if: env.OPEN_DRIVER == 'True'
|
||||
uses: browser-actions/setup-chrome@latest
|
||||
with:
|
||||
chrome-version: stable
|
||||
- name: Download chrome driver
|
||||
if: env.OPEN_DRIVER == 'True'
|
||||
uses: nanasess/setup-chromedriver@master
|
||||
- name: Launch chrome driver
|
||||
if: env.OPEN_DRIVER == 'True'
|
||||
run: |
|
||||
export DISPLAY=:99
|
||||
chromedriver --url-base=/wd/hub &
|
||||
|
Loading…
x
Reference in New Issue
Block a user