Merge pull request #1236 from gbtami/dependabot/pip/black-23.10.0 #4804
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: Python-CI | |
on: [pull_request, push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9, "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
pip install -r requirements.txt | |
- name: Lint with flake8 | |
run: | | |
flake8 server/ --count --show-source --statistics | |
- name: Run unit tests | |
run: | | |
mypy server/ | |
PYTHONPATH=server python tests/test.py | |
PYTHONPATH=server python tests/test_compress.py | |
PYTHONPATH=server python tests/test_tournament.py | |
PYTHONPATH=server python tests/test_disaster.py | |
PYTHONPATH=server python tests/test_scheduler.py |