Skip to content

Commit

Permalink
fix(action): deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielCousin committed Aug 3, 2023
1 parent 8447760 commit f8d77f6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import core from "@actions/core";
import { getInput, setFailed } from "@actions/core";
import puppeteer from "puppeteer";
import { wait } from "./utils/wait";

async function run(): Promise<void> {
const browser = await puppeteer.launch();
const browser = await puppeteer.launch({
headless: "new",
});

const waitMsInput = core.getInput("wait-on-start");
const waitMsInput = getInput("wait-on-start");
const waitMs = waitMsInput ? parseInt(waitMsInput) : 0;

const url = core.getInput("target-url", { required: true });
const selector = core.getInput("target-selector", { required: true });
const url = getInput("target-url", { required: true });
const selector = getInput("target-selector", { required: true });

await wait(waitMs);

Expand All @@ -20,7 +22,7 @@ async function run(): Promise<void> {
console.log("Smoke test succeeded");
} catch (error) {
console.log(error);
core.setFailed("Smoke test failed");
setFailed("Smoke test failed");
}

await browser.close();
Expand Down

0 comments on commit f8d77f6

Please sign in to comment.