-
Notifications
You must be signed in to change notification settings - Fork 15
63 lines (52 loc) · 1.54 KB
/
pytest.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
name: Unittests
# Allow to trigger the workflow manually (e.g., when deps changes)
on: [push, workflow_dispatch]
jobs:
pytest-job:
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
# Set up Python
- uses: actions/setup-python@v5
with:
python-version: "3.11"
# Install AndroidEnv
- name: Install AndroidEnv
run: |
git clone https://github.com/google-deepmind/android_env
cd android_env
python setup.py install
# Install AndroidWorld
- name: Install AndroidWorld
run: |
pip install -r requirements.txt
python setup.py install
# Set PYTHONPATH
- name: Set PYTHONPATH
run: |
echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV
# Set TMPDIR
- name: Set TMPDIR
run: |
echo "TMPDIR=/tmp/" >> $GITHUB_ENV
# Install additional dependencies
- name: Install additional dependencies
run: |
sudo apt-get update
sudo apt-get install -y fonts-dejavu fonts-liberation ttf-mscorefonts-installer
# Workaround for dependency issues with protobuf and google-generativeai
pip install protobuf==5.27.3
pip --version
pip install pytest-xdist
pip install -e .[dev]
pip freeze
# Run tests (in parallel)
- name: Run core tests
env:
PYTHONPATH: ${{ env.PYTHONPATH }}
run: |
pytest -vv -n auto --ignore=android_env