diff --git a/cspell.json b/cspell.json index e6fba96b..3b5c3a49 100644 --- a/cspell.json +++ b/cspell.json @@ -36,6 +36,15 @@ "vkey", "cbor", "metamap", + "libnss", + "libatk", + "libdrm", + "libxkbcommon", + "libgbm", + "libasound", + "libatspi", + "libxshmfence", + "xvfb" ], "ignorePaths": [ ".config/dictionaries", diff --git a/earthly/playwright/Earthfile b/earthly/playwright/Earthfile new file mode 100644 index 00000000..29a9b78a --- /dev/null +++ b/earthly/playwright/Earthfile @@ -0,0 +1,14 @@ +VERSION 0.8 + +playwright-base: + FROM mcr.microsoft.com/playwright:v1.45.2-jammy + WORKDIR /wallet-automation + + RUN apt-get update && apt-get install -y \ + libnss3 libatk-bridge2.0-0 libdrm-dev libxkbcommon-dev libgbm-dev libasound-dev libatspi2.0-0 libxshmfence-dev postgresql-client xvfb python3.11 python3-pip && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +SETUP: + FUNCTION + FROM +playwright-base \ No newline at end of file diff --git a/examples/playwright/Earthfile b/examples/playwright/Earthfile new file mode 100644 index 00000000..875d61bd --- /dev/null +++ b/examples/playwright/Earthfile @@ -0,0 +1,12 @@ +VERSION 0.8 + +IMPORT ../../earthly/playwright AS playwright-ci + +deps: + DO playwright-ci+SETUP + + COPY package.json . + COPY package-lock.json . + + RUN npm install + ENV PATH "/wallet-automation/node_modules/.bin:$PATH" \ No newline at end of file