-
Notifications
You must be signed in to change notification settings - Fork 81
51 lines (39 loc) · 1.43 KB
/
tests_linters.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
name: Tests and Linters 🧪
on: [ pull_request ]
jobs:
tests-and-linters:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"
timeout-minutes: 20
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest]
steps:
- name: Install dependencies for viewer test
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Checkout jumanji 🐍
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.26"
enable-cache: true
cache-dependency-glob: "requirements/requirements**.txt" # invalidate cache when requirements file changes
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Install python dependencies 🔧
run: uv pip install .[dev,train]
env:
UV_SYSTEM_PYTHON: 1
- name: Run linters 🖌️
run: pre-commit run --all-files --verbose
- name: Run tests 🧪
run: pytest -n 2 --cov=jumanji --cov-report=term-missing --junit-xml=test-results.xml -vv jumanji
- name: Run coverage
run: |
coverage html --directory=coverage_html_report
coverage report --fail-under=0.97
- name: Test build docs 📖
run: mkdocs build --verbose --site-dir docs_public