mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
|
concurrency:
|
||||||
group: ${{ github.head_ref || github.run_id }}
|
group: ci-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
2
.github/workflows/devtools.yml
vendored
2
.github/workflows/devtools.yml
vendored
@ -8,7 +8,7 @@ on:
|
|||||||
types: [labeled]
|
types: [labeled]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.head_ref || github.run_id }}
|
group: devtools-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
2
.github/workflows/issue-analyzer.yml
vendored
2
.github/workflows/issue-analyzer.yml
vendored
@ -7,7 +7,7 @@ on:
|
|||||||
types: [opened, reopened, edited]
|
types: [opened, reopened, edited]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ format('issue-{0}', github.event.issue.number) }}
|
group: issue-${{ format('issue-{0}', github.event.issue.number) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -255,20 +255,33 @@ process.on('unhandledRejection', reason => {
|
|||||||
const browserNotClosedError = new Error(
|
const browserNotClosedError = new Error(
|
||||||
'A manually launched browser was not closed!'
|
'A manually launched browser was not closed!'
|
||||||
);
|
);
|
||||||
|
|
||||||
export const mochaHooks = {
|
export const mochaHooks = {
|
||||||
async beforeAll(): Promise<void> {
|
async beforeAll(): Promise<void> {
|
||||||
const {server, httpsServer} = await setupServer();
|
async function setUpDefaultState() {
|
||||||
|
const {server, httpsServer} = await setupServer();
|
||||||
|
|
||||||
state.puppeteer = puppeteer;
|
state.puppeteer = puppeteer;
|
||||||
state.server = server;
|
state.server = server;
|
||||||
state.httpsServer = httpsServer;
|
state.httpsServer = httpsServer;
|
||||||
state.isFirefox = processVariables.isFirefox;
|
state.isFirefox = processVariables.isFirefox;
|
||||||
state.isChrome = processVariables.isChrome;
|
state.isChrome = processVariables.isChrome;
|
||||||
state.isHeadless = processVariables.isHeadless;
|
state.isHeadless = processVariables.isHeadless;
|
||||||
state.headless = processVariables.headless;
|
state.headless = processVariables.headless;
|
||||||
state.puppeteerPath = path.resolve(
|
state.puppeteerPath = path.resolve(
|
||||||
path.join(__dirname, '..', '..', 'packages', 'puppeteer')
|
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> {
|
async afterAll(): Promise<void> {
|
||||||
|
Loading…
Reference in New Issue
Block a user