Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use selenium-firefox docker image version 2.53.1 #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ before_install:
- cd ../..
- composer create-project -n --no-dev --prefer-dist blackboard-open-source/moodle-plugin-ci ci ^2
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
- docker run -d -p 127.0.0.1:4444:4444 --net=host -v /dev/shm:/dev/shm selenium/standalone-firefox:3

install:
- moodle-plugin-ci install
- docker run -d -p 127.0.0.1:4444:4444 --net=host -v /dev/shm:/dev/shm -v $HOME/build/moodle:$HOME/build/moodle selenium/standalone-firefox:2.53.1
- sleep 10

script:
- moodle-plugin-ci phplint
Expand Down
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,21 @@ env:
- MUSTACHE_IGNORE_NAMES=broken.mustache
- DB=pgsql
- MOODLE_BRANCH=master
- PROFILE=chrome

install:
- phpenv config-rm xdebug.ini
- nvm install 8.9
- nvm use 8.9
- make init
# Start Selenium Standalone with Chrome/Firefox installed.
- docker run -d -p 127.0.0.1:4444:4444 --net=host -v /dev/shm:/dev/shm selenium/standalone-${PROFILE}:3
# Mimic how a Moodle plugin would be run.
- cp -R tests/Fixture/moodle-local_travis ../moodle-local_travis
- export PATH="$(cd bin; pwd):$(cd vendor/bin; pwd):$PATH"
- export TRAVIS_BUILD_DIR=$(cd ../moodle-local_travis; pwd)

# Finally, the standard install step.
- moodle-plugin-ci install
# Start Selenium Standalone with Chrome.
- docker run -d -p 127.0.0.1:4444:4444 --net=host -v /dev/shm:/dev/shm -v $HOME/build/moodle:$HOME/build/moodle selenium/standalone-chrome:3
- sleep 10

script:
- make test-phpunit
Expand All @@ -54,7 +53,7 @@ script:
- moodle-plugin-ci grunt || [ "$MOODLE_BRANCH" != 'master' -a "$MOODLE_BRANCH" != 'MOODLE_38_STABLE' ]
- moodle-plugin-ci phpdoc
- moodle-plugin-ci phpunit --coverage-text
- moodle-plugin-ci behat --profile $PROFILE
- moodle-plugin-ci behat --profile chrome

jobs:
include:
Expand Down
13 changes: 9 additions & 4 deletions docs/TravisFileExplained.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ before_install:
- composer create-project -n --no-dev --prefer-dist blackboard-open-source/moodle-plugin-ci ci ^2
# Update the $PATH so scripts from this project can be called easily.
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
# Start Selenium Standalone server with Chrome/Firefox installed. If you
# prefer to run Behat tests with Chrome profile (see Behat step details below),
# use selenium/standalone-chrome:3 image instead.
- docker run -d -p 127.0.0.1:4444:4444 --net=host -v /dev/shm:/dev/shm selenium/standalone-firefox:3

# This lists steps that are run for installation and setup.
install:
Expand All @@ -84,6 +80,15 @@ install:
# - If your plugin has Behat features, then Behat will be setup.
# - If your plugin has unit tests, then PHPUnit will be setup.
- moodle-plugin-ci install
# Start Selenium Standalone server with Chrome/Firefox installed. If you
# prefer to run Behat tests with Chrome profile (see Behat step details below),
# use selenium/standalone-chrome:3 image instead. If you don't run Behat tests,
# this step is not needed.
- docker run -d -p 127.0.0.1:4444:4444 --net=host -v /dev/shm:/dev/shm -v $HOME/build/moodle:$HOME/build/moodle selenium/standalone-firefox:2.53.1
# Optional sleep interval, this is important if you run Behat tests as the first
# step after docker instance creation - in some cases Selenium server might
# not be ready yet, which will result in failure.
- sleep 10

# This lists steps that are run for the purposes of testing. Any of
# these steps can be re-ordered or removed to your liking. And of
Expand Down