Merge remote-tracking branch 'clangenofficial/development' into update #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: [push, workflow_dispatch, pull_request] | |
| jobs: | |
| # Run unittest tests. | |
| unittest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: '3.8' | |
| - python-version: '3.11' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download the test saves | |
| run: wget https://github.com/ImLvna/clangen-unittest-saves/archive/refs/heads/main.zip -O tests/saves.zip | |
| - name: Unzip | |
| run: unzip tests/saves.zip | |
| - name: Move the folder | |
| run: mv clangen-unittest-saves-main tests/testSaves | |
| - name: Remove the zip | |
| run: rm tests/saves.zip | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: 'x64' | |
| - name: Switch uv Python environment | |
| if: matrix.python-version == '3.8' | |
| run: uv venv --python 3.8 | |
| - name: install dependencies | |
| run: uv sync | |
| - name: Run unit tests | |
| env: | |
| SDL_VIDEODRIVER: "dummy" | |
| SDL_AUDIODRIVER: "disk" | |
| run: uv run python -m unittest tests/test_thoughts.py tests/test_relation_events.py tests/test_group_interaction.py tests/test_conditions.py tests/test_utility.py tests/test_cat.py tests/test_save.py tests/test_filter_patrol.py tests/test_lang.py | |
| json_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python 3.11 x64 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| architecture: 'x64' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: install dependencies | |
| run: uv sync --group test | |
| - name: Check json validity | |
| run: uv run tests/test_json.py | |
| - name: Check json schemas | |
| run: uv run tests/test_json_schemas.py | |
| pronoun_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python 3.11 x64 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| architecture: 'x64' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: install dependencies | |
| run: uv sync --group test | |
| - name: Check for pronoun tag errors in resources | |
| run: uv run python -m unittest tests/test_pronouns.py | |
| freshkill_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python 3.11 x64 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| architecture: 'x64' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: install dependencies | |
| run: uv sync --group test | |
| - name: Check for pronoun tag errors in resources | |
| run: uv run python -m unittest tests/test_freshkill.py |