Skip to content

Commit

Permalink
Merge pull request #7961 from jrjohnson/browser-testing
Browse files Browse the repository at this point in the history
Improve Browserstack Testing
  • Loading branch information
stopfstedt committed Jul 12, 2024
2 parents 6e1b0a2 + 470b7d2 commit 794afa5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 31 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
name: ${{matrix.workspace}} Test (${{ matrix.node-version }})
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [lint]

strategy:
fail-fast: false
Expand Down Expand Up @@ -92,22 +93,19 @@ jobs:
run: pnpm run --filter ${{matrix.workspace}} build

browserstack-test:
name: Browserstack ${{matrix.workspace}} ${{ matrix.launcher }}
name: Browser Stack Test
runs-on: ubuntu-latest
timeout-minutes: 120
needs: [test]
strategy:
fail-fast: false
max-parallel: 2
max-parallel: 1
matrix:
workspace:
- frontend
- test-app
- lti-course-manager
- lti-dashboard
launcher:
- BS_OSX_Safari
- BS_MS_Edge
- BS_IOS_SAFARI
- BS_CHROME_ANDROID
steps:
Expand All @@ -120,15 +118,15 @@ jobs:
node-version: 20
cache: pnpm
- run: pnpm install
- name: test:browserstack ${{ matrix.launcher }}
- name: test:browserstack ${{matrix.workspace}} ${{ matrix.launcher }}
env:
BROWSERSTACK_USERNAME: iliosgithub_1UGowwsqE
# This is in plaintext on purpose. It has no privileged access to anything (this is a free
# account) and it allows us to run browserstack tests against PRs.
BROWSERSTACK_ACCESS_KEY: yJjw6sE6izkpUw9oasGT
# The following is necessary when using browserstack under matrix builds on Github Actions
# The Job ID + Run ID isn't unique across matrix runs and will fail when run simultaneously
BROWSERSTACK_LOCAL_ID_SUFFIX: ${{ matrix.launcher }}
BROWSERSTACK_LOCAL_ID_SUFFIX: ${{matrix.workspace}}-${{ matrix.launcher }}
run: |
pnpm --filter ${{matrix.workspace}} exec ember browserstack:connect
pnpm --filter ${{matrix.workspace}} exec ember test --test-port=7774 --host=127.0.0.1 --config-file=testem.browserstack.js --launch=${{ matrix.launcher }}
Expand Down
7 changes: 1 addition & 6 deletions packages/frontend/testem.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ const BrowserStackLaunchers = {
],
protocol: 'browser',
},
BS_MS_Edge: {
exe: 'node_modules/.bin/browserstack-launch',
args: ['--os', 'Windows', '--osv', '11', '--b', 'edge', '--bv', '115', ...defaultArgs],
protocol: 'browser',
},
BS_IOS_SAFARI: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
Expand Down Expand Up @@ -64,7 +59,7 @@ module.exports = {
reporter: FailureOnlyPerBrowserReporter,
browser_start_timeout: 2000,
browser_disconnect_timeout: 120,
parallel: 4,
parallel: 1,
disable_watching: true,
launchers: BrowserStackLaunchers,
launch_in_dev: [],
Expand Down
7 changes: 1 addition & 6 deletions packages/lti-course-manager/testem.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ const BrowserStackLaunchers = {
],
protocol: 'browser',
},
BS_MS_Edge: {
exe: 'node_modules/.bin/browserstack-launch',
args: ['--os', 'Windows', '--osv', '11', '--b', 'edge', '--bv', '115', ...defaultArgs],
protocol: 'browser',
},
BS_IOS_SAFARI: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
Expand Down Expand Up @@ -64,7 +59,7 @@ module.exports = {
reporter: FailureOnlyPerBrowserReporter,
browser_start_timeout: 2000,
browser_disconnect_timeout: 120,
parallel: 4,
parallel: 1,
disable_watching: true,
launchers: BrowserStackLaunchers,
launch_in_dev: [],
Expand Down
7 changes: 1 addition & 6 deletions packages/lti-dashboard/testem.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ const BrowserStackLaunchers = {
],
protocol: 'browser',
},
BS_MS_Edge: {
exe: 'node_modules/.bin/browserstack-launch',
args: ['--os', 'Windows', '--osv', '11', '--b', 'edge', '--bv', '115', ...defaultArgs],
protocol: 'browser',
},
BS_IOS_SAFARI: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
Expand Down Expand Up @@ -64,7 +59,7 @@ module.exports = {
reporter: FailureOnlyPerBrowserReporter,
browser_start_timeout: 2000,
browser_disconnect_timeout: 120,
parallel: 4,
parallel: 1,
disable_watching: true,
launchers: BrowserStackLaunchers,
launch_in_dev: [],
Expand Down
7 changes: 1 addition & 6 deletions packages/test-app/testem.browserstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ const BrowserStackLaunchers = {
],
protocol: 'browser',
},
BS_MS_Edge: {
exe: 'node_modules/.bin/browserstack-launch',
args: ['--os', 'Windows', '--osv', '11', '--b', 'edge', '--bv', '115', ...defaultArgs],
protocol: 'browser',
},
BS_IOS_SAFARI: {
exe: 'node_modules/.bin/browserstack-launch',
args: [
Expand Down Expand Up @@ -64,7 +59,7 @@ module.exports = {
reporter: FailureOnlyPerBrowserReporter,
browser_start_timeout: 2000,
browser_disconnect_timeout: 120,
parallel: 4,
parallel: 1,
disable_watching: true,
launchers: BrowserStackLaunchers,
launch_in_dev: [],
Expand Down

0 comments on commit 794afa5

Please sign in to comment.