Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Oct 31, 2023
1 parent b733613 commit 53520cb
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'run-browser-test')
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
Expand Down
36 changes: 20 additions & 16 deletions .github/workflows/mocha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ jobs:
- name: Check event pull_request
if: github.event_name == 'pull_request'
run: 'echo pull_request: run workflow'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: github.event_name == 'push'
with:
persist-credentials: false
- name: Check event push
id: findPr
if: github.event_name == 'push'
Expand All @@ -46,10 +48,11 @@ jobs:
- 16
- 18
- 20
- 21
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node }}'
- run: npm install --production
Expand All @@ -60,10 +63,12 @@ jobs:
runs-on: ubuntu-latest
needs: smoke
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
Expand All @@ -90,17 +95,18 @@ jobs:
- 16
- 18
- 20
- 21
include:
- os: ubuntu-latest
node: 16
env:
COVERAGE: 1
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node }}'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Get npm cache directory in Windows
id: npm-cache
if: ${{ matrix.os == 'windows-2019' }}
Expand All @@ -111,8 +117,6 @@ jobs:
with:
path: ${{ matrix.os == 'ubuntu-latest' && '~/.npm' || steps.npm-cache.outputs.dir }}
key: "${{ matrix.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}"
restore-keys: |
${{ matrix.os }}-node-v${{ matrix.node }}-
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Install Annotation Support
Expand Down Expand Up @@ -141,19 +145,19 @@ jobs:
# Don't run forked 'pull_request' without saucelabs token
if: github.event_name == 'push' || !github.event.pull_request.head.repo.fork
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
path: '~/.npm'
# this key is different than above, since we are running scripts
# (builds, postinstall lifecycle hooks, etc.)
key: "ubuntu-latest-node-full-v16-${{ hashFiles('**/package-lock.json') }}"
restore-keys: |
ubuntu-latest-node-full-v16-
key: "ubuntu-latest-node-full-lts-${{ hashFiles('**/package-lock.json') }}"
- name: Install Dependencies
run: npm ci
- name: Run Browser Tests
Expand Down
11 changes: 5 additions & 6 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ const baseConfig = {
showDiff: true
},
customLaunchers: {
FirefoxDebug: {
base: "Firefox",
"moz:debuggerAddress": true
},
ChromeDebug: {
base: 'Chrome',
flags: ['--remote-debugging-port=9333']
Expand All @@ -95,7 +91,6 @@ module.exports = config => {
bundleDirPath = path.join(BASE_BUNDLE_DIR_PATH, buildId);
sauceConfig = {
build: buildId,

Check failure on line 93 in karma.conf.js

View workflow job for this annotation

GitHub Actions / Linting code and markdown

Delete `,`
geckodriverVersion: '0.30.0' // temporary workaround for firefox
};
} else {
console.error(`Local environment (${hostname}) detected`);
Expand Down Expand Up @@ -176,7 +171,7 @@ const addSauceTests = (cfg, sauceLabs) => {
const customLaunchers = sauceBrowsers.reduce((acc, sauceBrowser) => {
const platformName = SAUCE_BROWSER_PLATFORM_MAP[sauceBrowser];
const [browserName, browserVersion] = sauceBrowser.split('@');
return {
const result = {
...acc,
[sauceBrowser]: {
base: 'SauceLabs',
Expand All @@ -186,6 +181,10 @@ const addSauceTests = (cfg, sauceLabs) => {
'sauce:options': sauceLabs
}
};
if (browserName === 'firefox') {
result[sauceBrowser]['moz:debuggerAddress'] = true;
}
return result;
}, {});

return {
Expand Down

0 comments on commit 53520cb

Please sign in to comment.