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 ecd05e8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ Kroki
kubeconfig
lcov
ldflags
libasound
libatk
libatspi
libdrm
libgbm
libgcc
libnss
libxkbcommon
libxshmfence
lintfix
markdownlint
mattn
Expand Down Expand Up @@ -110,5 +118,6 @@ wasmtime
webkitallowfullscreen
WORKDIR
xerrors
xvfb
zstd
zstdcat
zstdcat
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"Scripthash",
"vkey",
"cbor",
"metamap",
"metamap"
],
"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 ecd05e8

Please sign in to comment.