Skip to content

Commit

Permalink
Add build to GH actions run (#4601)
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann authored Mar 11, 2021
1 parent c6f874f commit 21652d9
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ module.exports = config => {
console.error('CI mode enabled');
if (env.GITHUB_RUN_ID) {
console.error('Github Actions detected');
bundleDirPath = path.join(
BASE_BUNDLE_DIR_PATH,
`github-${env.GITHUB_RUN_ID}_${env.GITHUB_RUN_NUMBER}`
);
sauceConfig = {};
const buildId = `github-${env.GITHUB_RUN_ID}_${env.GITHUB_RUN_NUMBER}`;
bundleDirPath = path.join(BASE_BUNDLE_DIR_PATH, buildId);
sauceConfig = {
build: buildId
};
} else {
console.error(`Local environment (${hostname}) detected`);
// don't need to run sauce from Windows CI b/c travis does it.
Expand Down Expand Up @@ -170,15 +170,16 @@ const addSauceTests = (cfg, sauceLabs) => {

// creates Karma `customLauncher` configs from `SAUCE_BROWSER_PLATFORM_MAP`
const customLaunchers = sauceBrowsers.reduce((acc, sauceBrowser) => {
const platform = SAUCE_BROWSER_PLATFORM_MAP[sauceBrowser];
const [browserName, version] = sauceBrowser.split('@');
const platformName = SAUCE_BROWSER_PLATFORM_MAP[sauceBrowser];
const [browserName, browserVersion] = sauceBrowser.split('@');
return {
...acc,
[sauceBrowser]: {
base: 'SauceLabs',
browserName,
version,
platform
browserVersion,
platformName,
'sauce:options': sauceLabs
}
};
}, {});
Expand Down

0 comments on commit 21652d9

Please sign in to comment.