-
Notifications
You must be signed in to change notification settings - Fork 18
67 lines (50 loc) · 1.72 KB
/
unit_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Unit tests
on:
push:
branches:
- main
pull_request:
jobs:
agentlab:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Git user
run: git config --global user.email "[email protected]" && git config --global user.name "GitHub Actions"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Install AgentLab
run: pip install -e .
- name: Pip list
run: pip list
- name: Install Playwright
run: playwright install chromium --with-deps
- name: Download WebArena / VisualWebArena ressource files
run: python -c 'import nltk; nltk.download("punkt_tab")'
- name: Fetch MiniWob
uses: actions/checkout@v4
with:
repository: "Farama-Foundation/miniwob-plusplus"
ref: "7fd85d71a4b60325c6585396ec4f48377d049838"
path: "miniwob-plusplus"
- name: Serve MiniWob
uses: Eun/http-server-action@v1
with:
directory: "${{ github.workspace }}/miniwob-plusplus/miniwob/html"
port: 8080
# Step to check if MiniWob is reachable
- name: Check MiniWob availability
run: curl -I "http://localhost:8080/miniwob/" || echo "MiniWob not reachable"
- name: Pre-download nltk ressources
run: python -c "import nltk; nltk.download('punkt_tab')"
- name: Run AgentLab Unit Tests
env:
MINIWOB_URL: "http://localhost:8080/miniwob/"
run: pytest -n 5 --durations=10 -m 'not pricy' -v tests/