Update 1.1.3dev #15
This file contains 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: | |
python-version: ['3.8', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- 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 poetry | |
uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: 1.4.1 | |
- name: install dependencies | |
run: poetry install | |
- name: Run unit tests | |
env: | |
SDL_VIDEODRIVER: "dummy" | |
SDL_AUDIODRIVER: "disk" | |
run: poetry run python3 -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 poetry | |
uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: 1.4.1 | |
- name: install dependencies | |
run: poetry install --with test | |
- name: Check json validity | |
run: poetry run python3 tests/test_json.py | |
- name: Check json schemas | |
run: poetry run python3 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 poetry | |
uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: 1.4.1 | |
- name: install dependencies | |
run: poetry install | |
- name: Check for pronoun tag errors in resources | |
run: poetry run python3 -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 poetry | |
uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: 1.4.1 | |
- name: install dependencies | |
run: poetry install | |
- name: Check for pronoun tag errors in resources | |
run: poetry run python3 -m unittest tests/test_freshkill.py |