Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run tests
- name: Run tests (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
pytest -n 16 -sv --cov=textworld --cov-report=term-missing --cov-fail-under=85 tests/ textworld/

# On MacOS, tests/test_sample_quests.py crashes when run concurrently with
# pytest-xdist (native rendering/Graphviz), so it is run serially instead.
- name: Run tests (MacOS)
if: startsWith(matrix.os, 'macos')
run: |
pytest -n 16 -sv --cov=textworld --cov-report= --ignore=tests/test_sample_quests.py tests/ textworld/
pytest -sv --cov=textworld --cov-append --cov-report=term-missing --cov-fail-under=85 tests/test_sample_quests.py
3 changes: 2 additions & 1 deletion tests/test_sample_quests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under the MIT license.

import os
import sys
from os.path import join as pjoin
from subprocess import check_output

Expand All @@ -17,7 +18,7 @@ def test_sample_quests():
check_output(command).decode()

script = pjoin(SCRIPTS_PATH, "sample_quests.py")
command = ["python", script, "--nb-quests", "10", "--quest-length", "10",
command = [sys.executable, script, "--nb-quests", "10", "--quest-length", "10",
"--quest-breadth", "5", "--output", tmpdir, game_file]
stdout = check_output(command).decode()
assert len(stdout) > 0
Expand Down
Loading