migrate BrowserStack tests from TravisCI to GitHub Actions (#467)
This commit is contained in:
parent
334a36d572
commit
524451d717
2 changed files with 33 additions and 44 deletions
35
.github/workflows/test-workflow.yml
vendored
35
.github/workflows/test-workflow.yml
vendored
|
@ -61,7 +61,7 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: yarn test:csp-header
|
run: yarn test:csp-header
|
||||||
test-chrome:
|
test-chrome:
|
||||||
name: test in chromium
|
name: test against Chrome
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -81,7 +81,7 @@ jobs:
|
||||||
- name: run tests in chrome
|
- name: run tests in chrome
|
||||||
run: yarn test:ember --launch Chrome --path dist
|
run: yarn test:ember --launch Chrome --path dist
|
||||||
test-firefox:
|
test-firefox:
|
||||||
name: test in firefox
|
name: test against Firefox
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -98,6 +98,37 @@ jobs:
|
||||||
run: yarn build --environment test
|
run: yarn build --environment test
|
||||||
- name: run tests in firefox
|
- name: run tests in firefox
|
||||||
run: yarn test:ember --launch Firefox --path dist
|
run: yarn test:ember --launch Firefox --path dist
|
||||||
|
test-browserstack:
|
||||||
|
name: test against additional browser in BrowserStack
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '12.x'
|
||||||
|
- name: Install node modules
|
||||||
|
run: yarn install
|
||||||
|
- name: Build with test environment
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
run: yarn build --environment test
|
||||||
|
- name: 'BrowserStack Env Setup'
|
||||||
|
uses: 'browserstack/github-actions/setup-env@master'
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.BROWSERSTACK_USERNAME }}
|
||||||
|
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
||||||
|
- name: 'Start BrowserStackLocal Tunnel'
|
||||||
|
uses: 'browserstack/github-actions/setup-local@master'
|
||||||
|
with:
|
||||||
|
local-testing: 'start'
|
||||||
|
local-logging-level: 'all-logs'
|
||||||
|
local-identifier: 'random'
|
||||||
|
- name: 'Running test on BrowserStack'
|
||||||
|
run: yarn test:ember --config-file testem.browserstack.js --path dist
|
||||||
|
- name: 'BrowserStackLocal Stop'
|
||||||
|
uses: browserstack/github-actions/setup-local@master
|
||||||
|
with:
|
||||||
|
local-testing: stop
|
||||||
test-backend:
|
test-backend:
|
||||||
name: Test php backend
|
name: Test php backend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
42
.travis.yml
42
.travis.yml
|
@ -1,42 +0,0 @@
|
||||||
---
|
|
||||||
# TravisCI is only used for BrowserStack tests.
|
|
||||||
# All other tests are run as GitHub Actions.
|
|
||||||
|
|
||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "10"
|
|
||||||
|
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
addons:
|
|
||||||
chrome: stable
|
|
||||||
|
|
||||||
cache:
|
|
||||||
yarn: true
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- "BROWSERSTACK_USERNAME=jeldrikhanschke1"
|
|
||||||
- "BROWSERSTACK_ACCESS_KEY=xaM9Uxurv2GyxFLKQXgj"
|
|
||||||
# See https://git.io/vdao3 for details.
|
|
||||||
- JOBS=1
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
|
||||||
- export PATH=$HOME/.yarn/bin:$PATH
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
# create a browser stack tunnel for cross-browser testing
|
|
||||||
- node_modules/ember-cli/bin/ember browserstack:connect
|
|
||||||
|
|
||||||
script:
|
|
||||||
# run tests on BrowserStack
|
|
||||||
- yarn test:ember --config-file testem.browserstack.js
|
|
||||||
|
|
||||||
after_script:
|
|
||||||
# destroy the sauce tunnel
|
|
||||||
- inode_modules/ember-cli/bin/ember browserstack:disconnect
|
|
Loading…
Reference in a new issue