Merge pull request #944 from jbdyn/make-maze-generation-iterative #459
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: Run tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| pytest: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[test] | |
| python -m pip install pytest-timestamper # this plugin adds timestamps to the output | |
| python -c "import zmq; print('Using pyzmq {} and zmq {}.'.format(zmq.pyzmq_version(), zmq.zmq_version()))" | |
| - name: Test with pytest | |
| run: | | |
| python -m pytest -v -s --cov=./pelita/ test/ | |
| timeout-minutes: 8 | |
| - name: Upload coverage data to coveralls.io | |
| uses: AndreMiras/coveralls-python-action@develop | |
| if: runner.os == 'Linux' # Only works on Linux | |
| with: | |
| github-token: ${{ secrets.github_token }} | |
| flag-name: run-${{ matrix.os }}-py-${{ matrix.python-version }} | |
| parallel: true | |
| - name: Run Pelita CLI as a module | |
| run: | | |
| python -m pelita.scripts.pelita_main --null | |
| - name: Run Pelita CLI as a script | |
| run: | | |
| pelita --null --rounds 100 --size small | |
| - name: Run Pelita CLI without timeouts | |
| run: | | |
| pelita --null --rounds 100 --size small --no-timeout | |
| - name: Test Pelita template repo | |
| run: | | |
| # We must clone pelita_template to a location outside of the pelita repo | |
| # Otherwise pelita’s own setup.cfg will be used for test configuration | |
| cd .. | |
| git clone https://github.com/ASPP/pelita_template | |
| cd pelita_template | |
| python -m pytest -v -s . | |
| coveralls: | |
| name: Indicate completion to coveralls.io | |
| needs: pytest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: AndreMiras/coveralls-python-action@develop | |
| with: | |
| parallel-finished: true | |
| ruff: | |
| name: Run ruff static checker | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/ruff-action@v3 | |
| tournament: | |
| # The tournament does not need to run everywhere. | |
| # Only test on the latest ubuntu/macos for recent versions of Python. | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.12", "3.13", "3.14"] | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e . | |
| python -c "import zmq; print('Using pyzmq {} and zmq {}.'.format(zmq.pyzmq_version(), zmq.zmq_version()))" | |
| - name: Run Pelita tournament | |
| run: | | |
| pelita-tournament --non-interactive --viewer null | |
| timeout-minutes: 10 | |
| contrib: | |
| # The contrib stuff does not need to run everywhere. | |
| # Only test on the latest ubuntu/macos for recent versions of Python. | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.12", "3.13", "3.14"] | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[test] | |
| python -c "import zmq; print('Using pyzmq {} and zmq {}.'.format(zmq.pyzmq_version(), zmq.zmq_version()))" | |
| - name: Test with pytest | |
| run: | | |
| python -m pytest -v -s contrib/ | |
| timeout-minutes: 3 | |
| - name: Run ci_engine session | |
| run: | | |
| cd contrib | |
| python ci_engine.py -n 5 | |
| timeout-minutes: 5 |