Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build to GH actions run #4601

Merged
merged 1 commit into from Mar 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 10 additions & 9 deletions karma.conf.js
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