Skip to content

Expose redis port locally in playwright workflow #5

Expose redis port locally in playwright workflow

Expose redis port locally in playwright workflow #5

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4
# https://github.com/asdf-vm/actions#setup
- name: Install asdf
uses: asdf-vm/actions/setup@v3
with:
asdf_branch: v0.14.1
- name: Install Node.js with asdf
run: |
asdf plugin add nodejs
asdf install nodejs
- name: Install dependencies
run: npm ci
- name: Build the application
run: npm run build
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
# https://github.com/actions/upload-artifact
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30