Skip to content

test: add playwright tests #7

test: add playwright tests

test: add playwright tests #7

Workflow file for this run

name: Tests
on:
push:
branches: [ version-15 ]
pull_request:
jobs:
test:
name: Mobile
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.6
env:
MYSQL_ALLOW_EMPTY_PASSWORD: YES
MYSQL_ROOT_PASSWORD: 'admin'
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Clone
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
cache: 'yarn'
- name: Add to Hosts
run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install JS Dependencies
run: yarn --prefer-offline
- name: Install App Dependencies
run: bash ${{ github.workspace }}/.github/helper/install_dependencies.sh
- name: Install Bench Site and Apps
env:
MYSQL_HOST: 'localhost'
MYSQL_PWD: 'admin'
run: bash ${{ github.workspace }}/.github/helper/install.sh
- name: Run Mobile Tests
working-directory: /home/runner/frappe-bench
run: |
source env/bin/activate
cd apps/beam
poetry install
python -m playwright install --with-deps
pytest ./beam/tests/mobile --browser chromium --disable-warnings