Skip to content

Commit cbc2e05

Browse files
Add scheduled tests for compositional tasks
1 parent 9afa49e commit cbc2e05

4 files changed

Lines changed: 33 additions & 6 deletions

File tree

.github/workflows/unit_tests.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches:
66
- main
77
pull_request:
8+
schedule:
9+
- cron: '0 0 * * 5' # Runs at midnight on Friday
810

911
jobs:
1012

@@ -101,4 +103,32 @@ jobs:
101103
SNOW_INSTANCE_URL: ${{ secrets.SNOW_INSTANCE_URL }}
102104
SNOW_INSTANCE_UNAME: ${{ secrets.SNOW_INSTANCE_UNAME }}
103105
SNOW_INSTANCE_PWD: ${{ secrets.SNOW_INSTANCE_PWD }}
104-
run: pytest -n 5 --durations=10 -m 'slow and not pricy' --slowmo 1000 -v tests
106+
run: pytest -n 5 --durations=10 -m 'slow and not pricy' --slowmo 1000 -v tests
107+
108+
end-to-end-tests:
109+
runs-on: ubuntu-latest
110+
if: github.event_name == 'schedule'
111+
defaults:
112+
run:
113+
shell: bash -l {0}
114+
steps:
115+
- name: Checkout Repository
116+
uses: actions/checkout@v4
117+
- name: Set up Python
118+
uses: actions/setup-python@v5
119+
with:
120+
python-version: '3.10'
121+
cache: 'pip'
122+
- name: Pip install
123+
working-directory: ./dev
124+
run: pip install -r requirements.txt
125+
- name: Pip list
126+
run: pip list
127+
- name: Install Playwright
128+
run: playwright install --with-deps
129+
- name: Run E2E Tests
130+
env:
131+
SNOW_INSTANCE_URL: ${{ secrets.SNOW_INSTANCE_URL }}
132+
SNOW_INSTANCE_UNAME: ${{ secrets.SNOW_INSTANCE_UNAME }}
133+
SNOW_INSTANCE_PWD: ${{ secrets.SNOW_INSTANCE_PWD }}
134+
run: pytest -n 10 --durations=10 -m 'pricy' --slowmo 1800 -v tests
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import random
2-
31
from browsergym.core.env import BrowserEnv
42
from browsergym.workarena import get_all_tasks_agents
53

tests/test_compositional.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
@pytest.mark.parametrize("random_seed", range(1))
5050
@pytest.mark.parametrize("level", range(2, 4))
5151
@pytest.mark.slow
52-
@pytest.mark.skip(reason="Tests are too slow")
52+
# @pytest.mark.skip(reason="Tests are too slow")
5353
def test_cheat_compositional(task_entrypoint, random_seed, level, page: Page):
5454
task = task_entrypoint(seed=random_seed, level=level)
5555
goal, info = task.setup(page=page)
@@ -74,8 +74,7 @@ def test_cheat_compositional(task_entrypoint, random_seed, level, page: Page):
7474
before_sleep=lambda _: logging.info("Retrying due to a TimeoutError..."),
7575
)
7676
@pytest.mark.parametrize("task_entrypoint, seed", zip(AGENT_L2_SAMPLED_TASKS, AGENT_L2_SEEDS))
77-
@pytest.mark.slow
78-
@pytest.mark.skip(reason="Tests are too slow")
77+
@pytest.mark.pricy
7978
def test_cheat_compositional_sampled_agent_set_l2(task_entrypoint, seed, page: Page):
8079
task = task_entrypoint(seed=seed)
8180
goal, info = task.setup(page=page)

0 commit comments

Comments
 (0)