Skip to content

Commit

Permalink
Add build to GH actions run
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Mar 9, 2021
1 parent c6f874f commit 473211d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions karma.conf.js
Expand Up @@ -88,11 +88,14 @@ module.exports = config => {
console.error('CI mode enabled');
if (env.GITHUB_RUN_ID) {
console.error('Github Actions detected');
const buildId = `github-${env.GITHUB_RUN_ID}_${env.GITHUB_RUN_NUMBER}`
bundleDirPath = path.join(
BASE_BUNDLE_DIR_PATH,
`github-${env.GITHUB_RUN_ID}_${env.GITHUB_RUN_NUMBER}`
buildId
);
sauceConfig = {};
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 +173,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 473211d

Please sign in to comment.