Skip to content

Commit

Permalink
wip: run browser tests on gha
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Nov 10, 2020
1 parent b1f26e2 commit 4312cc7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/mocha.yml
Expand Up @@ -198,3 +198,27 @@ jobs:
uses: coverallsapp/github-action@master
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
test-browser:
name: 'Browser Tests'
needs: smoke
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/checkout@v2
- name: 'Cache node_modules'
uses: actions/cache@v2
with:
path: '~/.npm'
key: "ubuntu-latest-node-full-v14-${{ hashFiles('**/package-lock.json') }}"
restore-keys: |
ubuntu-latest-node-full-v14-
- name: Install Dependencies
run: npm ci
- name: Run Browser Tests
run: npm start test.browser
env:
NODE_PATH: .
SAUCE_USERNAME: '${{secrets.SAUCE_USERNAME}}'
SAUCE_ACCESS_KEY: '${{secrets.SAUCE_ACCESS_KEY}}'
21 changes: 12 additions & 9 deletions karma.conf.js
Expand Up @@ -86,7 +86,10 @@ module.exports = config => {
// configuration for CI mode
if (env.CI) {
console.error('CI mode enabled');
if (env.TRAVIS) {
if (env.GITHUB) {
console.error('Github Actions detected');
sauceConfig = {};
} else if (env.TRAVIS) {
console.error('Travis-CI detected');
bundleDirPath = path.join(BASE_BUNDLE_DIR_PATH, env.TRAVIS_BUILD_ID);
if (env.SAUCE_USERNAME && env.SAUCE_ACCESS_KEY) {
Expand Down Expand Up @@ -200,14 +203,14 @@ const addSauceTests = (cfg, sauceLabs) => {
...customLaunchers
},
sauceLabs: {
...sauceLabs,
public: 'public',
connectOptions: {
connectRetries: 2,
connectRetryTimeout: 30000,
detached: sauceLabs.startConnect,
tunnelIdentifier: sauceLabs.tunnelIdentifier
}
...sauceLabs
// public: 'public',
// connectOptions: {
// connectRetries: 2,
// connectRetryTimeout: 30000,
// detached: sauceLabs.startConnect,
// tunnelIdentifier: sauceLabs.tunnelIdentifier
// }
},
concurrency: Infinity,
retryLimit: 1,
Expand Down

0 comments on commit 4312cc7

Please sign in to comment.