ci: fix Actions not running sometimes (#10503)
This commit is contained in:
parent
15cf3a5e6d
commit
0d2c42a1c4
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -12,7 +12,7 @@ on:
|
||||
- '**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
group: ci-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
2
.github/workflows/devtools.yml
vendored
2
.github/workflows/devtools.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
types: [labeled]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
group: devtools-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
2
.github/workflows/issue-analyzer.yml
vendored
2
.github/workflows/issue-analyzer.yml
vendored
@ -7,7 +7,7 @@ on:
|
||||
types: [opened, reopened, edited]
|
||||
|
||||
concurrency:
|
||||
group: ${{ format('issue-{0}', github.event.issue.number) }}
|
||||
group: issue-${{ format('issue-{0}', github.event.issue.number) }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
@ -255,20 +255,33 @@ process.on('unhandledRejection', reason => {
|
||||
const browserNotClosedError = new Error(
|
||||
'A manually launched browser was not closed!'
|
||||
);
|
||||
|
||||
export const mochaHooks = {
|
||||
async beforeAll(): Promise<void> {
|
||||
const {server, httpsServer} = await setupServer();
|
||||
async function setUpDefaultState() {
|
||||
const {server, httpsServer} = await setupServer();
|
||||
|
||||
state.puppeteer = puppeteer;
|
||||
state.server = server;
|
||||
state.httpsServer = httpsServer;
|
||||
state.isFirefox = processVariables.isFirefox;
|
||||
state.isChrome = processVariables.isChrome;
|
||||
state.isHeadless = processVariables.isHeadless;
|
||||
state.headless = processVariables.headless;
|
||||
state.puppeteerPath = path.resolve(
|
||||
path.join(__dirname, '..', '..', 'packages', 'puppeteer')
|
||||
);
|
||||
state.puppeteer = puppeteer;
|
||||
state.server = server;
|
||||
state.httpsServer = httpsServer;
|
||||
state.isFirefox = processVariables.isFirefox;
|
||||
state.isChrome = processVariables.isChrome;
|
||||
state.isHeadless = processVariables.isHeadless;
|
||||
state.headless = processVariables.headless;
|
||||
state.puppeteerPath = path.resolve(
|
||||
path.join(__dirname, '..', '..', 'packages', 'puppeteer')
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
await Deferred.race([
|
||||
setUpDefaultState(),
|
||||
Deferred.create({
|
||||
message: `Failed in after Hook`,
|
||||
timeout: (this as any).timeout() - 1000,
|
||||
}),
|
||||
]);
|
||||
} catch {}
|
||||
},
|
||||
|
||||
async afterAll(): Promise<void> {
|
||||
|
Loading…
Reference in New Issue
Block a user