57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
name: 'Install Testing'
|
|
jobs:
|
|
ubuntu-job:
|
|
name: 'BrowserStack Test on Ubuntu'
|
|
runs-on: ubuntu-latest # Can be self-hosted runner also
|
|
env:
|
|
GITACTIONS: true
|
|
steps:
|
|
|
|
- name: 'BrowserStack Env Setup' # Invokes the setup-env action
|
|
uses: browserstack/github-actions/setup-env@master
|
|
with:
|
|
username: ${{ secrets.BROWSERSTACK_USERNAME }}
|
|
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
|
|
|
- name: 'BrowserStack Local Tunnel Setup' # Invokes the setup-local action
|
|
uses: browserstack/github-actions/setup-local@master
|
|
with:
|
|
local-testing: start
|
|
local-identifier: random
|
|
|
|
# The next 3 steps are for building the web application to be tested and starting the web server on the runner environment
|
|
|
|
- name: 'Checkout the repository'
|
|
uses: actions/checkout@v2
|
|
|
|
- name: 'Install Bundler'
|
|
run: sudo gem install bundler
|
|
|
|
- name: 'apt-get update'
|
|
run: sudo apt-get update
|
|
|
|
- name: 'Testing setup'
|
|
run: bundle config unset --local without
|
|
|
|
- name: 'Testing setup2'
|
|
run: bundle config set --local with 'test' 'development'
|
|
|
|
- name: 'Installing BeEF'
|
|
run: ./install
|
|
env:
|
|
TERM: xterm
|
|
|
|
- name: 'Running application under test'
|
|
run: export BEEF_TEST=true
|
|
|
|
- name: 'Running unit tests'
|
|
run: bundle exec rake --trace
|
|
|
|
- name: 'Running test on BrowserStack' # Invokes the actual test script that would run on BrowserStack browsers
|
|
run: bundle exec rake browserstack --trace
|
|
|
|
- name: 'BrowserStackLocal Stop' # Terminating the BrowserStackLocal tunnel connection
|
|
uses: browserstack/github-actions/setup-local@master
|
|
with:
|
|
local-testing: stop
|