Skip to content

Instantly share code, notes, and snippets.

@pjvds
Last active January 11, 2019 11:41
Show Gist options
  • Select an option

  • Save pjvds/6008266 to your computer and use it in GitHub Desktop.

Select an option

Save pjvds/6008266 to your computer and use it in GitHub Desktop.

Revisions

  1. pjvds revised this gist Jul 16, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion wercker.yml
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ build:
    # Start xvfb which gives the context an virtual display
    # which is required for tests that require an GUI
    export DISPLAY=:99.0
    sudo sh -e /etc/init.d/xvfb start
    start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
    # Give xvfb time to start. 3 seconds is the default for all xvfb-run commands.
    sleep 3
  2. pjvds revised this gist Jul 16, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion wercker.yml
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ build:
    # Start xvfb which gives the context an virtual display
    # which is required for tests that require an GUI
    export DISPLAY=:99.0
    sh -e /etc/init.d/xvfb start
    sudo sh -e /etc/init.d/xvfb start
    # Give xvfb time to start. 3 seconds is the default for all xvfb-run commands.
    sleep 3
  3. pjvds revised this gist Jul 16, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion wercker.yml
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,9 @@ build:
    # which is required for tests that require an GUI
    export DISPLAY=:99.0
    sh -e /etc/init.d/xvfb start
    sleep 3 # give xvfb some time to start
    # Give xvfb time to start. 3 seconds is the default for all xvfb-run commands.
    sleep 3
    # Install (apt-get) packages
    - install-packages:
    packages: libqtwebkit-dev
  4. pjvds created this gist Jul 16, 2013.
    38 changes: 38 additions & 0 deletions wercker.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    box: wercker/ubuntu12.04-ruby1.9.3
    services:
    - wercker/postgresql
    build:
    # The steps that will be executed on build
    steps:
    - script:
    name: Enable virtual display
    code: |-
    # Start xvfb which gives the context an virtual display
    # which is required for tests that require an GUI
    export DISPLAY=:99.0
    sh -e /etc/init.d/xvfb start
    sleep 3 # give xvfb some time to start
    # Install (apt-get) packages
    - install-packages:
    packages: libqtwebkit-dev
    # A step that executes `bundle install` command
    - bundle-install
    # A step that prepares the database.yml with settings from the database you defined in services
    - rails-database-yml:
    service: postgresql
    # A custom script step, name value is used in the UI
    # and the code value contains the command that get executed
    - script:
    name: echo ruby information
    code: |
    echo "ruby version $(ruby --version) running"
    echo "from location $(which ruby)"
    echo -p "gem list: $(gem list)"
    #migrations
    - script:
    name: rake
    code: bundle exec rake db:migrate RAILS_ENV=test
    # Run forest Run
    - script:
    name: rspec
    code: bundle exec rspec