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

Use playwright image #259

Closed
wants to merge 13 commits into from
56 changes: 35 additions & 21 deletions .github/workflows/frontend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,26 @@ jobs:

e2e-test-frontend:
runs-on: ubuntu-latest
# container:
# image: mcr.microsoft.com/playwright:v1.50.0-noble
# options: --user 1001
container:
image: mcr.microsoft.com/playwright/java:v1.50.0-noble
# options: --user 1001
steps:
- name: whoami
run: whoami
- uses: actions/checkout@v4
# setup backend
- name: Install curl
run: |
apt update
apt install -y curl
# - name: Set up Docker
# uses: docker/setup-docker-action@v4
- name: Install docker
run: |
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
# - name: Start docker
# run: service docker start
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -138,7 +152,7 @@ jobs:
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b
- name: Start backend
working-directory: ./backend
run: ./gradlew bootRun & # we'll wait for the backend to respond right before running the tests
run: ./gradlew bootRun # we'll wait for the backend to respond right before running the tests
# setup frontend
- name: Setup Node
uses: actions/setup-node@v4
Expand All @@ -153,23 +167,23 @@ jobs:
path: |
./frontend/node_modules
key: modules-${{ hashFiles('./frontend/package-lock.json') }}
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: |
npm ci
working-directory: ./frontend
- name: Get Playwright version
working-directory: ./frontend
run: echo "PLAYWRIGHT_VERSION=$(jq -r '.packages["node_modules/@playwright/test"].version' package-lock.json)" >> $GITHUB_ENV
- name: Cache browser binaries
id: cache-browser-binaries
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install Playwright Browsers
working-directory: ./frontend
run: npx playwright install --with-deps
# - name: Install dependencies
# if: steps.node-modules-cache.outputs.cache-hit != 'true'
# run: |
# npm ci
# working-directory: ./frontend
# - name: Get Playwright version
# working-directory: ./frontend
# run: echo "PLAYWRIGHT_VERSION=$(jq -r '.packages["node_modules/@playwright/test"].version' package-lock.json)" >> $GITHUB_ENV
# - name: Cache browser binaries
# id: cache-browser-binaries
# uses: actions/cache@v4
# with:
# path: ~/.cache/ms-playwright
# key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
# - name: Install Playwright Browsers
# working-directory: ./frontend
# run: npx playwright install --with-deps
- name: Wait for backend to serve the health Actuator (max 5min)
timeout-minutes: 5
run: |
Expand Down
Loading