Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: speed up e2e: correct gitignore, cache playwright #2796

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/test-pr-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,25 @@ jobs:
- name: Install dependencies using poetry
run: poetry install --no-interaction --no-root --with dev

- name: Install Playwright dependencies
run: npx playwright install --with-deps
- name: Get Playwright version from poetry.lock
id: playwright-version
run: |
PLAYWRIGHT_VERSION=$(grep "playwright" poetry.lock -A 5 | grep "version" | head -n 1 | cut -d'"' -f2)
echo "version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ steps.playwright-version.outputs.version }}

- name: Install playwright
run: poetry run playwright install
- name: Install Playwright and dependencies
run: |
if [ "${{ steps.playwright-cache.outputs.cache-hit }}" != "true" ]; then
poetry run playwright install --with-deps
else
poetry run playwright install-deps
fi

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile.ui
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


FROM node:18-alpine AS base
FROM node:20-alpine AS base

# Install dependencies only when needed
FROM base AS deps
Expand Down
8 changes: 8 additions & 0 deletions keep-ui/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
.next
.vercel
.env.*
.venv/
.vscode/
.github/
.pytest_cache
Loading