You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 22, 2021. It is now read-only.
I would make the PR, but I am not well versed in JS.
For .github/workflows/selenium-service.yml
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- created
jobs:
container-job:
runs-on: ubuntu-latest
# runs all of the steps inside the specified container rather than on the VM host.
# Because of this the network configuration changes from host based network to a container network.
container:
image: node:current
services:
selenium:
image: selenium/standalone-chrome
# needed because the selenium container does not provide a healthcheck
options: --health-cmd '/opt/bin/check-grid.sh'
steps:
- uses: actions/checkout@v1
- run: npm ci
working-directory: ./selenium
- run: node client.js
working-directory: ./selenium
# use selenium for the host here because we have specified a container for the job.
# If we were running the job on the VM this would be localhost
SELENIUM_HOST: selenium
# The default port will be the one used when we have specified a container for the job.
SELENIUM_PORT: 4444
# Runs all steps on the VM
# The service containers will use host port binding instead of container networking so you access them via localhost rather than the service name
vm-job:
runs-on: ubuntu-latest
services:
selenium:
image: selenium/standalone-chrome
ports:
# will assign a random free host port
- 4444/tcp
# needed because the selenium container does not provide a healthcheck
options: --health-cmd '/opt/bin/check-grid.sh'
steps:
- uses: actions/checkout@v1
- run: npm ci
working-directory: ./selenium
- run: node client.js
working-directory: ./selenium
env:
# use localhost for the host here because we are running the job on the VM.
# If we were running the job on in a container this would be selenium
SELENIUM_HOST: localhost
SELENIUM_PORT: ${{ job.services.selenium.ports[4444] }} # get randomly assigned published port
I would make the PR, but I am not well versed in JS.
For
.github/workflows/selenium-service.ymlFor the
selenium/client.js,Something like