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 33c702b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
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 33c702b

Please sign in to comment.