Skip to content

Commit

Permalink
chore(ci): Adding Playwright function
Browse files Browse the repository at this point in the history
  • Loading branch information
emiride committed Sep 26, 2024
1 parent 8882d57 commit cbfeff8
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
"vkey",
"cbor",
"metamap",
"libnss",
"libatk",
"libdrm",
"libxkbcommon",
"libgbm",
"libasound",
"libatspi",
"libxshmfence",
"xvfb"
],
"ignorePaths": [
".config/dictionaries",
Expand Down
14 changes: 14 additions & 0 deletions earthly/playwright/Earthfile
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions examples/playwright/Earthfile
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit cbfeff8

Please sign in to comment.