Skip to content

Commit 2b94222

Browse files
committed
Run tests for build wheels
1 parent 3bdd9e9 commit 2b94222

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
pip install rfbrowser-wheel/robotframework_browser-*-py3-none-any.whl
119119
pip install browser-batteries-wheels/robotframework_browser_batteries-*-py3-none-*.whl
120120
rfbrowser --version
121-
rfbrowser install-browser
121+
rfbrowser install-browser --with-deps
122122
- name: Install Browser and BrowserBatteries On Windows
123123
if: matrix.os == 'windows-latest'
124124
run: |
@@ -127,3 +127,35 @@ jobs:
127127
pip install (Resolve-Path browser-batteries-wheels/robotframework_browser_batteries-*-py3-none-*.whl)
128128
rfbrowser --version
129129
rfbrowser install-browser
130+
- name: Install test dependencies
131+
run: |
132+
pip install -r Browser/dev-requirements.txt
133+
- name: Unzip demoapp *nix
134+
if: matrix.os != 'windows-latest'
135+
run: |
136+
rm -rf Browser
137+
rm -rf node
138+
rm -rf browser_batteries
139+
ls -l demoapp
140+
unzip demoapp/demo-app*.zip -d .
141+
- name: Unzip demoapp Windows
142+
if: matrix.os == 'windows-latest'
143+
run: |
144+
Remove-Item -Path .\Browser -Force -Recurse
145+
Remove-Item -Path .\node -Force -Recurse
146+
Remove-Item -Path .\browser_batteries -Force -Recurse
147+
dir demoapp
148+
Expand-Archive -Path (Resolve-Path demoapp/demo-app*.zip) -DestinationPath .
149+
- name: Run tests on ${{ matrix.os }} with packed demoapp
150+
if : matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'ubuntu-latest'
151+
run: |
152+
xvfb-run --auto-servernum invoke atest-robot --smoke
153+
- name: Run tests on ${{ matrix.os }} with packed demoapp
154+
if : matrix.os == 'windows-latest' || matrix.os == 'macos-latest' || matrix.os == 'macos-13'
155+
run: |
156+
inv atest-robot
157+
- uses: actions/upload-artifact@v4
158+
if: ${{ always() }}
159+
with:
160+
name: Clean_install_results_${{ matrix.os }}
161+
path: atest/output

tasks.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
import subprocess
77
import sys
88
import sysconfig
9-
import time
109
import traceback
1110
import zipfile
12-
from datetime import datetime
1311
from pathlib import Path, PurePath
1412
from typing import Iterable
1513
from xml.etree import ElementTree as ET
@@ -149,6 +147,8 @@ def clean_mini(c):
149147
ZIP_DIR,
150148
BROWSER_BATTERIES_BIN_DIR,
151149
BROWSER_BATTERIES_DIR / "dist",
150+
Path("./playwright-log.txt"),
151+
PYTHON_SRC_DIR / "rfbrowser.log",
152152
]:
153153
if target.exists():
154154
shutil.rmtree(target)
@@ -170,12 +170,10 @@ def clean(c):
170170
for file in [
171171
npm_deps_timestamp_file,
172172
node_lint_timestamp_file,
173-
Path("./playwright-log.txt"),
174173
Path("./.coverage"),
175174
pyi_file,
176175
Path("./.ruff_cache"),
177176
Path("./.pytest_cache"),
178-
PYTHON_SRC_DIR / "rfbrowser.log",
179177
]:
180178
try:
181179
file.unlink()
@@ -840,7 +838,7 @@ def create_package(c):
840838
c.run("python -m build")
841839

842840

843-
@task(clean, build, docs, create_package)
841+
@task(clean_mini, build, docs, create_package)
844842
def package(c: Context):
845843
"""Build python wheel for Browser release."""
846844

0 commit comments

Comments
 (0)