CI: run tests multi-threaded (#2251)
This commit is contained in:
parent
f9761ad4e5
commit
5d9b47355e
|
@ -54,9 +54,9 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install pytest pytest-subtests
|
pip install pytest pytest-subtests pytest-xdist
|
||||||
python ModuleUpdate.py --yes --force --append "WebHostLib/requirements.txt"
|
python ModuleUpdate.py --yes --force --append "WebHostLib/requirements.txt"
|
||||||
python Launcher.py --update_settings # make sure host.yaml exists for tests
|
python Launcher.py --update_settings # make sure host.yaml exists for tests
|
||||||
- name: Unittests
|
- name: Unittests
|
||||||
run: |
|
run: |
|
||||||
pytest
|
pytest -n auto
|
||||||
|
|
|
@ -1,16 +1,11 @@
|
||||||
import pathlib
|
|
||||||
import typing
|
import typing
|
||||||
import unittest
|
import unittest
|
||||||
from argparse import Namespace
|
from argparse import Namespace
|
||||||
|
|
||||||
import Utils
|
|
||||||
from test.general import gen_steps
|
from test.general import gen_steps
|
||||||
from worlds import AutoWorld
|
from worlds import AutoWorld
|
||||||
from worlds.AutoWorld import call_all
|
from worlds.AutoWorld import call_all
|
||||||
|
|
||||||
file_path = pathlib.Path(__file__).parent.parent
|
|
||||||
Utils.local_path.cached_path = file_path
|
|
||||||
|
|
||||||
from BaseClasses import MultiWorld, CollectionState, ItemClassification, Item
|
from BaseClasses import MultiWorld, CollectionState, ItemClassification, Item
|
||||||
from worlds.alttp.Items import ItemFactory
|
from worlds.alttp.Items import ItemFactory
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import pathlib
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import settings
|
import settings
|
||||||
|
@ -5,3 +6,12 @@ import settings
|
||||||
warnings.simplefilter("always")
|
warnings.simplefilter("always")
|
||||||
settings.no_gui = True
|
settings.no_gui = True
|
||||||
settings.skip_autosave = True
|
settings.skip_autosave = True
|
||||||
|
|
||||||
|
import ModuleUpdate
|
||||||
|
|
||||||
|
ModuleUpdate.update_ran = True # don't upgrade
|
||||||
|
|
||||||
|
import Utils
|
||||||
|
|
||||||
|
Utils.local_path.cached_path = pathlib.Path(__file__).parent.parent
|
||||||
|
Utils.user_path() # initialize cached_path
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# Tests for Generate.py (ArchipelagoGenerate.exe)
|
# Tests for Generate.py (ArchipelagoGenerate.exe)
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
import os
|
||||||
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
import os.path
|
|
||||||
import os
|
|
||||||
import ModuleUpdate
|
|
||||||
ModuleUpdate.update_ran = True # don't upgrade
|
|
||||||
import Generate
|
import Generate
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue