Skip to content

Commit

Permalink
CI: run tests multi-threaded (ArchipelagoMW#2251)
Browse files Browse the repository at this point in the history
  • Loading branch information
black-sliver authored Oct 2, 2023
1 parent f9761ad commit 5d9b473
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
- name: Install dependencies
run: |
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 Launcher.py --update_settings # make sure host.yaml exists for tests
- name: Unittests
run: |
pytest
pytest -n auto
5 changes: 0 additions & 5 deletions test/TestBase.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import pathlib
import typing
import unittest
from argparse import Namespace

import Utils
from test.general import gen_steps
from worlds import AutoWorld
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 worlds.alttp.Items import ItemFactory

Expand Down
10 changes: 10 additions & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import pathlib
import warnings

import settings

warnings.simplefilter("always")
settings.no_gui = 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
8 changes: 4 additions & 4 deletions test/programs/TestGenerate.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Tests for Generate.py (ArchipelagoGenerate.exe)

import unittest
import os
import os.path
import sys

from pathlib import Path
from tempfile import TemporaryDirectory
import os.path
import os
import ModuleUpdate
ModuleUpdate.update_ran = True # don't upgrade

import Generate


Expand Down

0 comments on commit 5d9b473

Please sign in to comment.